1 package foo.bar; 2 3 import androidx.annotation.NonNull; 4 import androidx.room.InvalidationTracker; 5 import androidx.room.RoomOpenDelegate; 6 import androidx.room.migration.AutoMigrationSpec; 7 import androidx.room.migration.Migration; 8 import androidx.room.util.DBUtil; 9 import androidx.room.util.TableInfo; 10 import androidx.room.util.ViewInfo; 11 import androidx.sqlite.SQLite; 12 import androidx.sqlite.SQLiteConnection; 13 import java.lang.Class; 14 import java.lang.Override; 15 import java.lang.String; 16 import java.lang.SuppressWarnings; 17 import java.util.ArrayList; 18 import java.util.HashMap; 19 import java.util.HashSet; 20 import java.util.List; 21 import java.util.Map; 22 import java.util.Set; 23 import javax.annotation.processing.Generated; 24 25 @Generated("androidx.room.RoomProcessor") 26 @SuppressWarnings({"unchecked", "deprecation", "removal"}) 27 public final class ComplexDatabase_Impl extends ComplexDatabase { 28 private volatile ComplexDao _complexDao; 29 30 @Override 31 @NonNull createOpenDelegate()32 protected RoomOpenDelegate createOpenDelegate() { 33 final RoomOpenDelegate _openDelegate = new RoomOpenDelegate(1923, "12b646c55443feeefb567521e2bece85", "2f1dbf49584f5d6c91cb44f8a6ecfee2") { 34 @Override 35 public void createAllTables(@NonNull final SQLiteConnection connection) { 36 SQLite.execSQL(connection, "CREATE TABLE IF NOT EXISTS `User` (`uid` INTEGER NOT NULL, `name` TEXT, `lastName` TEXT, `ageColumn` INTEGER NOT NULL, PRIMARY KEY(`uid`))"); 37 SQLite.execSQL(connection, "CREATE TABLE IF NOT EXISTS `Child1` (`id` INTEGER NOT NULL, `name` TEXT, `serial` INTEGER, `code` TEXT, PRIMARY KEY(`id`))"); 38 SQLite.execSQL(connection, "CREATE TABLE IF NOT EXISTS `Child2` (`id` INTEGER NOT NULL, `name` TEXT, `serial` INTEGER, `code` TEXT, PRIMARY KEY(`id`))"); 39 SQLite.execSQL(connection, "CREATE VIEW `UserSummary` AS SELECT uid, name FROM User"); 40 SQLite.execSQL(connection, "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)"); 41 SQLite.execSQL(connection, "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '12b646c55443feeefb567521e2bece85')"); 42 } 43 44 @Override 45 public void dropAllTables(@NonNull final SQLiteConnection connection) { 46 SQLite.execSQL(connection, "DROP TABLE IF EXISTS `User`"); 47 SQLite.execSQL(connection, "DROP TABLE IF EXISTS `Child1`"); 48 SQLite.execSQL(connection, "DROP TABLE IF EXISTS `Child2`"); 49 SQLite.execSQL(connection, "DROP VIEW IF EXISTS `UserSummary`"); 50 } 51 52 @Override 53 public void onCreate(@NonNull final SQLiteConnection connection) { 54 } 55 56 @Override 57 public void onOpen(@NonNull final SQLiteConnection connection) { 58 internalInitInvalidationTracker(connection); 59 } 60 61 @Override 62 public void onPreMigrate(@NonNull final SQLiteConnection connection) { 63 DBUtil.dropFtsSyncTriggers(connection); 64 } 65 66 @Override 67 public void onPostMigrate(@NonNull final SQLiteConnection connection) { 68 } 69 70 @Override 71 @NonNull 72 public RoomOpenDelegate.ValidationResult onValidateSchema( 73 @NonNull final SQLiteConnection connection) { 74 final Map<String, TableInfo.Column> _columnsUser = new HashMap<String, TableInfo.Column>(4); 75 _columnsUser.put("uid", new TableInfo.Column("uid", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY)); 76 _columnsUser.put("name", new TableInfo.Column("name", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 77 _columnsUser.put("lastName", new TableInfo.Column("lastName", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 78 _columnsUser.put("ageColumn", new TableInfo.Column("ageColumn", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY)); 79 final Set<TableInfo.ForeignKey> _foreignKeysUser = new HashSet<TableInfo.ForeignKey>(0); 80 final Set<TableInfo.Index> _indicesUser = new HashSet<TableInfo.Index>(0); 81 final TableInfo _infoUser = new TableInfo("User", _columnsUser, _foreignKeysUser, _indicesUser); 82 final TableInfo _existingUser = TableInfo.read(connection, "User"); 83 if (!_infoUser.equals(_existingUser)) { 84 return new RoomOpenDelegate.ValidationResult(false, "User(foo.bar.User).\n" 85 + " Expected:\n" + _infoUser + "\n" 86 + " Found:\n" + _existingUser); 87 } 88 final Map<String, TableInfo.Column> _columnsChild1 = new HashMap<String, TableInfo.Column>(4); 89 _columnsChild1.put("id", new TableInfo.Column("id", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY)); 90 _columnsChild1.put("name", new TableInfo.Column("name", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 91 _columnsChild1.put("serial", new TableInfo.Column("serial", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 92 _columnsChild1.put("code", new TableInfo.Column("code", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 93 final Set<TableInfo.ForeignKey> _foreignKeysChild1 = new HashSet<TableInfo.ForeignKey>(0); 94 final Set<TableInfo.Index> _indicesChild1 = new HashSet<TableInfo.Index>(0); 95 final TableInfo _infoChild1 = new TableInfo("Child1", _columnsChild1, _foreignKeysChild1, _indicesChild1); 96 final TableInfo _existingChild1 = TableInfo.read(connection, "Child1"); 97 if (!_infoChild1.equals(_existingChild1)) { 98 return new RoomOpenDelegate.ValidationResult(false, "Child1(foo.bar.Child1).\n" 99 + " Expected:\n" + _infoChild1 + "\n" 100 + " Found:\n" + _existingChild1); 101 } 102 final Map<String, TableInfo.Column> _columnsChild2 = new HashMap<String, TableInfo.Column>(4); 103 _columnsChild2.put("id", new TableInfo.Column("id", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY)); 104 _columnsChild2.put("name", new TableInfo.Column("name", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 105 _columnsChild2.put("serial", new TableInfo.Column("serial", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 106 _columnsChild2.put("code", new TableInfo.Column("code", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY)); 107 final Set<TableInfo.ForeignKey> _foreignKeysChild2 = new HashSet<TableInfo.ForeignKey>(0); 108 final Set<TableInfo.Index> _indicesChild2 = new HashSet<TableInfo.Index>(0); 109 final TableInfo _infoChild2 = new TableInfo("Child2", _columnsChild2, _foreignKeysChild2, _indicesChild2); 110 final TableInfo _existingChild2 = TableInfo.read(connection, "Child2"); 111 if (!_infoChild2.equals(_existingChild2)) { 112 return new RoomOpenDelegate.ValidationResult(false, "Child2(foo.bar.Child2).\n" 113 + " Expected:\n" + _infoChild2 + "\n" 114 + " Found:\n" + _existingChild2); 115 } 116 final ViewInfo _infoUserSummary = new ViewInfo("UserSummary", "CREATE VIEW `UserSummary` AS SELECT uid, name FROM User"); 117 final ViewInfo _existingUserSummary = ViewInfo.read(connection, "UserSummary"); 118 if (!_infoUserSummary.equals(_existingUserSummary)) { 119 return new RoomOpenDelegate.ValidationResult(false, "UserSummary(foo.bar.UserSummary).\n" 120 + " Expected:\n" + _infoUserSummary + "\n" 121 + " Found:\n" + _existingUserSummary); 122 } 123 return new RoomOpenDelegate.ValidationResult(true, null); 124 } 125 }; 126 return _openDelegate; 127 } 128 129 @Override 130 @NonNull createInvalidationTracker()131 protected InvalidationTracker createInvalidationTracker() { 132 final Map<String, String> _shadowTablesMap = new HashMap<String, String>(0); 133 final Map<String, Set<String>> _viewTables = new HashMap<String, Set<String>>(1); 134 final Set<String> _tables = new HashSet<String>(1); 135 _tables.add("User"); 136 _viewTables.put("usersummary", _tables); 137 return new InvalidationTracker(this, _shadowTablesMap, _viewTables, "User", "Child1", "Child2"); 138 } 139 140 @Override clearAllTables()141 public void clearAllTables() { 142 super.performClear(false, "User", "Child1", "Child2"); 143 } 144 145 @Override 146 @NonNull getRequiredTypeConverters()147 protected Map<Class<?>, List<Class<?>>> getRequiredTypeConverters() { 148 final Map<Class<?>, List<Class<?>>> _typeConvertersMap = new HashMap<Class<?>, List<Class<?>>>(); 149 _typeConvertersMap.put(ComplexDao.class, ComplexDao_Impl.getRequiredConverters()); 150 return _typeConvertersMap; 151 } 152 153 @Override 154 @NonNull getRequiredAutoMigrationSpecs()155 public Set<Class<? extends AutoMigrationSpec>> getRequiredAutoMigrationSpecs() { 156 final Set<Class<? extends AutoMigrationSpec>> _autoMigrationSpecsSet = new HashSet<Class<? extends AutoMigrationSpec>>(); 157 return _autoMigrationSpecsSet; 158 } 159 160 @Override 161 @NonNull getAutoMigrations( @onNull final Map<Class<? extends AutoMigrationSpec>, AutoMigrationSpec> autoMigrationSpecs)162 public List<Migration> getAutoMigrations( 163 @NonNull final Map<Class<? extends AutoMigrationSpec>, AutoMigrationSpec> autoMigrationSpecs) { 164 final List<Migration> _autoMigrations = new ArrayList<Migration>(); 165 return _autoMigrations; 166 } 167 168 @Override getComplexDao()169 ComplexDao getComplexDao() { 170 if (_complexDao != null) { 171 return _complexDao; 172 } else { 173 synchronized(this) { 174 if(_complexDao == null) { 175 _complexDao = new ComplexDao_Impl(this); 176 } 177 return _complexDao; 178 } 179 } 180 } 181 }