package com.ubt.jimu.gen; import android.database.Cursor; import android.database.sqlite.SQLiteStatement; import com.liulishuo.filedownloader.model.FileDownloadModel; import com.ubt.jimu.base.entities.ActionResult; import com.ubt.jimu.base.entities.Course; import com.ubt.jimu.controller.data.widget.JockstickDataConverter; import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.Property; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseStatement; import org.greenrobot.greendao.internal.DaoConfig; /* loaded from: classes2.dex */ public class CourseDao extends AbstractDao { public static final String TABLENAME = "COURSE"; public static class Properties { public static final Property T_id = new Property(0, Integer.TYPE, "t_id", false, "T_ID"); public static final Property Id = new Property(1, Long.TYPE, JockstickDataConverter.ID, true, FileDownloadModel.ID); public static final Property StoryName = new Property(2, String.class, "storyName", false, "STORY_NAME"); public static final Property NameKey = new Property(3, String.class, "nameKey", false, "NAME_KEY"); public static final Property DescKey = new Property(4, String.class, "descKey", false, "DESC_KEY"); public static final Property TaskDescKey = new Property(5, String.class, "taskDescKey", false, "TASK_DESC_KEY"); public static final Property ModelId = new Property(6, Integer.TYPE, "modelId", false, "MODEL_ID"); public static final Property Level = new Property(7, Integer.TYPE, "level", false, "LEVEL"); public static final Property CourseName = new Property(8, String.class, "courseName", false, "COURSE_NAME"); public static final Property NextCourse = new Property(9, String.class, "nextCourse", false, "NEXT_COURSE"); public static final Property SuccessStoryVideo = new Property(10, String.class, "successStoryVideo", false, "SUCCESS_STORY_VIDEO"); public static final Property FinishedFlag = new Property(11, String.class, "finishedFlag", false, "FINISHED_FLAG"); public static final Property AnswerPath = new Property(12, String.class, "answerPath", false, "ANSWER_PATH"); public static final Property ResourceZip = new Property(13, String.class, "resourceZip", false, "RESOURCE_ZIP"); public static final Property CreatedBy = new Property(14, Integer.TYPE, "createdBy", false, "CREATED_BY"); public static final Property CreatedTime = new Property(15, Long.TYPE, "createdTime", false, "CREATED_TIME"); public static final Property UpdatedBy = new Property(16, Integer.TYPE, "updatedBy", false, "UPDATED_BY"); public static final Property UpdatedTime = new Property(17, Long.TYPE, "updatedTime", false, "UPDATED_TIME"); public static final Property IsDeleted = new Property(18, String.class, "isDeleted", false, "IS_DELETED"); public static final Property UserId = new Property(19, Integer.TYPE, "userId", false, "USER_ID"); public static final Property Lan = new Property(20, String.class, "lan", false, "LAN"); public static final Property IsAvailable = new Property(21, Integer.TYPE, "isAvailable", false, "IS_AVAILABLE"); public static final Property Score = new Property(22, Integer.TYPE, "score", false, "SCORE"); public static final Property Exp = new Property(23, Integer.TYPE, "exp", false, "EXP"); public static final Property CapScience = new Property(24, Integer.TYPE, ActionResult.KEY_SCIENCE, false, "CAP_SCIENCE"); public static final Property CapSpace = new Property(25, Integer.TYPE, ActionResult.KEY_SPACE, false, "CAP_SPACE"); public static final Property CapMath = new Property(26, Integer.TYPE, ActionResult.KEY_MATH, false, "CAP_MATH"); public static final Property CapEngineering = new Property(27, Integer.TYPE, ActionResult.KEY_ENGINEER, false, "CAP_ENGINEERING"); public static final Property CapArt = new Property(28, Integer.TYPE, ActionResult.KEY_ART, false, "CAP_ART"); public static final Property Download = new Property(29, Boolean.TYPE, "download", false, "DOWNLOAD"); public static final Property DownloadTime = new Property(30, Long.TYPE, "downloadTime", false, "DOWNLOAD_TIME"); public static final Property Useable = new Property(31, Boolean.TYPE, "useable", false, "USEABLE"); public static final Property CourseThumbnail = new Property(32, String.class, "courseThumbnail", false, "COURSE_THUMBNAIL"); public static final Property CourseThumbnailLock = new Property(33, String.class, "courseThumbnailLock", false, "COURSE_THUMBNAIL_LOCK"); public static final Property Status = new Property(34, String.class, FileDownloadModel.STATUS, false, "STATUS"); public static final Property RobotDownloaded = new Property(35, Boolean.TYPE, "robotDownloaded", false, "ROBOT_DOWNLOADED"); public static final Property CommonResource = new Property(36, String.class, "commonResource", false, "COMMON_RESOURCE"); public static final Property CommonResUpdatedTime = new Property(37, Long.TYPE, "commonResUpdatedTime", false, "COMMON_RES_UPDATED_TIME"); public static final Property LanguageResource = new Property(38, String.class, "languageResource", false, "LANGUAGE_RESOURCE"); public static final Property LangResUpdatedTime = new Property(39, Long.TYPE, "langResUpdatedTime", false, "LANG_RES_UPDATED_TIME"); } public CourseDao(DaoConfig daoConfig, DaoSession daoSession) { super(daoConfig, daoSession); } @Override // org.greenrobot.greendao.AbstractDao protected final boolean i() { return true; } public static void b(Database database, boolean z) { StringBuilder sb = new StringBuilder(); sb.append("DROP TABLE "); sb.append(z ? "IF EXISTS " : ""); sb.append("\"COURSE\""); database.a(sb.toString()); } /* JADX WARN: Can't rename method to resolve collision */ @Override // org.greenrobot.greendao.AbstractDao public Long b(Cursor cursor, int i) { return Long.valueOf(cursor.getLong(i + 1)); } public static void a(Database database, boolean z) { database.a("CREATE TABLE " + (z ? "IF NOT EXISTS " : "") + "\"COURSE\" (\"T_ID\" INTEGER NOT NULL ,\"_id\" INTEGER PRIMARY KEY NOT NULL ,\"STORY_NAME\" TEXT,\"NAME_KEY\" TEXT,\"DESC_KEY\" TEXT,\"TASK_DESC_KEY\" TEXT,\"MODEL_ID\" INTEGER NOT NULL ,\"LEVEL\" INTEGER NOT NULL ,\"COURSE_NAME\" TEXT,\"NEXT_COURSE\" TEXT,\"SUCCESS_STORY_VIDEO\" TEXT,\"FINISHED_FLAG\" TEXT,\"ANSWER_PATH\" TEXT,\"RESOURCE_ZIP\" TEXT,\"CREATED_BY\" INTEGER NOT NULL ,\"CREATED_TIME\" INTEGER NOT NULL ,\"UPDATED_BY\" INTEGER NOT NULL ,\"UPDATED_TIME\" INTEGER NOT NULL ,\"IS_DELETED\" TEXT,\"USER_ID\" INTEGER NOT NULL ,\"LAN\" TEXT,\"IS_AVAILABLE\" INTEGER NOT NULL ,\"SCORE\" INTEGER NOT NULL ,\"EXP\" INTEGER NOT NULL ,\"CAP_SCIENCE\" INTEGER NOT NULL ,\"CAP_SPACE\" INTEGER NOT NULL ,\"CAP_MATH\" INTEGER NOT NULL ,\"CAP_ENGINEERING\" INTEGER NOT NULL ,\"CAP_ART\" INTEGER NOT NULL ,\"DOWNLOAD\" INTEGER NOT NULL ,\"DOWNLOAD_TIME\" INTEGER NOT NULL ,\"USEABLE\" INTEGER NOT NULL ,\"COURSE_THUMBNAIL\" TEXT,\"COURSE_THUMBNAIL_LOCK\" TEXT,\"STATUS\" TEXT,\"ROBOT_DOWNLOADED\" INTEGER NOT NULL ,\"COMMON_RESOURCE\" TEXT,\"COMMON_RES_UPDATED_TIME\" INTEGER NOT NULL ,\"LANGUAGE_RESOURCE\" TEXT,\"LANG_RES_UPDATED_TIME\" INTEGER NOT NULL );"); } /* JADX INFO: Access modifiers changed from: protected */ @Override // org.greenrobot.greendao.AbstractDao public final void a(DatabaseStatement databaseStatement, Course course) { databaseStatement.a(); databaseStatement.a(1, course.getT_id()); databaseStatement.a(2, course.getId()); String storyName = course.getStoryName(); if (storyName != null) { databaseStatement.a(3, storyName); } String nameKey = course.getNameKey(); if (nameKey != null) { databaseStatement.a(4, nameKey); } String descKey = course.getDescKey(); if (descKey != null) { databaseStatement.a(5, descKey); } String taskDescKey = course.getTaskDescKey(); if (taskDescKey != null) { databaseStatement.a(6, taskDescKey); } databaseStatement.a(7, course.getModelId()); databaseStatement.a(8, course.getLevel()); String courseName = course.getCourseName(); if (courseName != null) { databaseStatement.a(9, courseName); } String nextCourse = course.getNextCourse(); if (nextCourse != null) { databaseStatement.a(10, nextCourse); } String successStoryVideo = course.getSuccessStoryVideo(); if (successStoryVideo != null) { databaseStatement.a(11, successStoryVideo); } String finishedFlag = course.getFinishedFlag(); if (finishedFlag != null) { databaseStatement.a(12, finishedFlag); } String answerPath = course.getAnswerPath(); if (answerPath != null) { databaseStatement.a(13, answerPath); } String resourceZip = course.getResourceZip(); if (resourceZip != null) { databaseStatement.a(14, resourceZip); } databaseStatement.a(15, course.getCreatedBy()); databaseStatement.a(16, course.getCreatedTime()); databaseStatement.a(17, course.getUpdatedBy()); databaseStatement.a(18, course.getUpdatedTime()); String isDeleted = course.getIsDeleted(); if (isDeleted != null) { databaseStatement.a(19, isDeleted); } databaseStatement.a(20, course.getUserId()); String lan = course.getLan(); if (lan != null) { databaseStatement.a(21, lan); } databaseStatement.a(22, course.getIsAvailable()); databaseStatement.a(23, course.getScore()); databaseStatement.a(24, course.getExp()); databaseStatement.a(25, course.getCapScience()); databaseStatement.a(26, course.getCapSpace()); databaseStatement.a(27, course.getCapMath()); databaseStatement.a(28, course.getCapEngineering()); databaseStatement.a(29, course.getCapArt()); databaseStatement.a(30, course.getDownload() ? 1L : 0L); databaseStatement.a(31, course.getDownloadTime()); databaseStatement.a(32, course.getUseable() ? 1L : 0L); String courseThumbnail = course.getCourseThumbnail(); if (courseThumbnail != null) { databaseStatement.a(33, courseThumbnail); } String courseThumbnailLock = course.getCourseThumbnailLock(); if (courseThumbnailLock != null) { databaseStatement.a(34, courseThumbnailLock); } String status = course.getStatus(); if (status != null) { databaseStatement.a(35, status); } databaseStatement.a(36, course.getRobotDownloaded() ? 1L : 0L); String commonResource = course.getCommonResource(); if (commonResource != null) { databaseStatement.a(37, commonResource); } databaseStatement.a(38, course.getCommonResUpdatedTime()); String languageResource = course.getLanguageResource(); if (languageResource != null) { databaseStatement.a(39, languageResource); } databaseStatement.a(40, course.getLangResUpdatedTime()); } /* JADX INFO: Access modifiers changed from: protected */ @Override // org.greenrobot.greendao.AbstractDao public final void a(SQLiteStatement sQLiteStatement, Course course) { sQLiteStatement.clearBindings(); sQLiteStatement.bindLong(1, course.getT_id()); sQLiteStatement.bindLong(2, course.getId()); String storyName = course.getStoryName(); if (storyName != null) { sQLiteStatement.bindString(3, storyName); } String nameKey = course.getNameKey(); if (nameKey != null) { sQLiteStatement.bindString(4, nameKey); } String descKey = course.getDescKey(); if (descKey != null) { sQLiteStatement.bindString(5, descKey); } String taskDescKey = course.getTaskDescKey(); if (taskDescKey != null) { sQLiteStatement.bindString(6, taskDescKey); } sQLiteStatement.bindLong(7, course.getModelId()); sQLiteStatement.bindLong(8, course.getLevel()); String courseName = course.getCourseName(); if (courseName != null) { sQLiteStatement.bindString(9, courseName); } String nextCourse = course.getNextCourse(); if (nextCourse != null) { sQLiteStatement.bindString(10, nextCourse); } String successStoryVideo = course.getSuccessStoryVideo(); if (successStoryVideo != null) { sQLiteStatement.bindString(11, successStoryVideo); } String finishedFlag = course.getFinishedFlag(); if (finishedFlag != null) { sQLiteStatement.bindString(12, finishedFlag); } String answerPath = course.getAnswerPath(); if (answerPath != null) { sQLiteStatement.bindString(13, answerPath); } String resourceZip = course.getResourceZip(); if (resourceZip != null) { sQLiteStatement.bindString(14, resourceZip); } sQLiteStatement.bindLong(15, course.getCreatedBy()); sQLiteStatement.bindLong(16, course.getCreatedTime()); sQLiteStatement.bindLong(17, course.getUpdatedBy()); sQLiteStatement.bindLong(18, course.getUpdatedTime()); String isDeleted = course.getIsDeleted(); if (isDeleted != null) { sQLiteStatement.bindString(19, isDeleted); } sQLiteStatement.bindLong(20, course.getUserId()); String lan = course.getLan(); if (lan != null) { sQLiteStatement.bindString(21, lan); } sQLiteStatement.bindLong(22, course.getIsAvailable()); sQLiteStatement.bindLong(23, course.getScore()); sQLiteStatement.bindLong(24, course.getExp()); sQLiteStatement.bindLong(25, course.getCapScience()); sQLiteStatement.bindLong(26, course.getCapSpace()); sQLiteStatement.bindLong(27, course.getCapMath()); sQLiteStatement.bindLong(28, course.getCapEngineering()); sQLiteStatement.bindLong(29, course.getCapArt()); sQLiteStatement.bindLong(30, course.getDownload() ? 1L : 0L); sQLiteStatement.bindLong(31, course.getDownloadTime()); sQLiteStatement.bindLong(32, course.getUseable() ? 1L : 0L); String courseThumbnail = course.getCourseThumbnail(); if (courseThumbnail != null) { sQLiteStatement.bindString(33, courseThumbnail); } String courseThumbnailLock = course.getCourseThumbnailLock(); if (courseThumbnailLock != null) { sQLiteStatement.bindString(34, courseThumbnailLock); } String status = course.getStatus(); if (status != null) { sQLiteStatement.bindString(35, status); } sQLiteStatement.bindLong(36, course.getRobotDownloaded() ? 1L : 0L); String commonResource = course.getCommonResource(); if (commonResource != null) { sQLiteStatement.bindString(37, commonResource); } sQLiteStatement.bindLong(38, course.getCommonResUpdatedTime()); String languageResource = course.getLanguageResource(); if (languageResource != null) { sQLiteStatement.bindString(39, languageResource); } sQLiteStatement.bindLong(40, course.getLangResUpdatedTime()); } /* JADX WARN: Can't rename method to resolve collision */ @Override // org.greenrobot.greendao.AbstractDao public Course a(Cursor cursor, int i) { int i2 = cursor.getInt(i + 0); long j = cursor.getLong(i + 1); int i3 = i + 2; String string = cursor.isNull(i3) ? null : cursor.getString(i3); int i4 = i + 3; String string2 = cursor.isNull(i4) ? null : cursor.getString(i4); int i5 = i + 4; String string3 = cursor.isNull(i5) ? null : cursor.getString(i5); int i6 = i + 5; String string4 = cursor.isNull(i6) ? null : cursor.getString(i6); int i7 = cursor.getInt(i + 6); int i8 = cursor.getInt(i + 7); int i9 = i + 8; String string5 = cursor.isNull(i9) ? null : cursor.getString(i9); int i10 = i + 9; String string6 = cursor.isNull(i10) ? null : cursor.getString(i10); int i11 = i + 10; String string7 = cursor.isNull(i11) ? null : cursor.getString(i11); int i12 = i + 11; String string8 = cursor.isNull(i12) ? null : cursor.getString(i12); int i13 = i + 12; String string9 = cursor.isNull(i13) ? null : cursor.getString(i13); int i14 = i + 13; String string10 = cursor.isNull(i14) ? null : cursor.getString(i14); int i15 = cursor.getInt(i + 14); long j2 = cursor.getLong(i + 15); int i16 = cursor.getInt(i + 16); long j3 = cursor.getLong(i + 17); int i17 = i + 18; String string11 = cursor.isNull(i17) ? null : cursor.getString(i17); int i18 = cursor.getInt(i + 19); int i19 = i + 20; String string12 = cursor.isNull(i19) ? null : cursor.getString(i19); int i20 = cursor.getInt(i + 21); int i21 = cursor.getInt(i + 22); int i22 = cursor.getInt(i + 23); int i23 = cursor.getInt(i + 24); int i24 = cursor.getInt(i + 25); int i25 = cursor.getInt(i + 26); int i26 = cursor.getInt(i + 27); int i27 = cursor.getInt(i + 28); boolean z = cursor.getShort(i + 29) != 0; long j4 = cursor.getLong(i + 30); boolean z2 = cursor.getShort(i + 31) != 0; int i28 = i + 32; String string13 = cursor.isNull(i28) ? null : cursor.getString(i28); int i29 = i + 33; String string14 = cursor.isNull(i29) ? null : cursor.getString(i29); int i30 = i + 34; String string15 = cursor.isNull(i30) ? null : cursor.getString(i30); boolean z3 = cursor.getShort(i + 35) != 0; int i31 = i + 36; String string16 = cursor.isNull(i31) ? null : cursor.getString(i31); int i32 = i + 38; return new Course(i2, j, string, string2, string3, string4, i7, i8, string5, string6, string7, string8, string9, string10, i15, j2, i16, j3, string11, i18, string12, i20, i21, i22, i23, i24, i25, i26, i27, z, j4, z2, string13, string14, string15, z3, string16, cursor.getLong(i + 37), cursor.isNull(i32) ? null : cursor.getString(i32), cursor.getLong(i + 39)); } @Override // org.greenrobot.greendao.AbstractDao public void a(Cursor cursor, Course course, int i) { course.setT_id(cursor.getInt(i + 0)); course.setId(cursor.getLong(i + 1)); int i2 = i + 2; course.setStoryName(cursor.isNull(i2) ? null : cursor.getString(i2)); int i3 = i + 3; course.setNameKey(cursor.isNull(i3) ? null : cursor.getString(i3)); int i4 = i + 4; course.setDescKey(cursor.isNull(i4) ? null : cursor.getString(i4)); int i5 = i + 5; course.setTaskDescKey(cursor.isNull(i5) ? null : cursor.getString(i5)); course.setModelId(cursor.getInt(i + 6)); course.setLevel(cursor.getInt(i + 7)); int i6 = i + 8; course.setCourseName(cursor.isNull(i6) ? null : cursor.getString(i6)); int i7 = i + 9; course.setNextCourse(cursor.isNull(i7) ? null : cursor.getString(i7)); int i8 = i + 10; course.setSuccessStoryVideo(cursor.isNull(i8) ? null : cursor.getString(i8)); int i9 = i + 11; course.setFinishedFlag(cursor.isNull(i9) ? null : cursor.getString(i9)); int i10 = i + 12; course.setAnswerPath(cursor.isNull(i10) ? null : cursor.getString(i10)); int i11 = i + 13; course.setResourceZip(cursor.isNull(i11) ? null : cursor.getString(i11)); course.setCreatedBy(cursor.getInt(i + 14)); course.setCreatedTime(cursor.getLong(i + 15)); course.setUpdatedBy(cursor.getInt(i + 16)); course.setUpdatedTime(cursor.getLong(i + 17)); int i12 = i + 18; course.setIsDeleted(cursor.isNull(i12) ? null : cursor.getString(i12)); course.setUserId(cursor.getInt(i + 19)); int i13 = i + 20; course.setLan(cursor.isNull(i13) ? null : cursor.getString(i13)); course.setIsAvailable(cursor.getInt(i + 21)); course.setScore(cursor.getInt(i + 22)); course.setExp(cursor.getInt(i + 23)); course.setCapScience(cursor.getInt(i + 24)); course.setCapSpace(cursor.getInt(i + 25)); course.setCapMath(cursor.getInt(i + 26)); course.setCapEngineering(cursor.getInt(i + 27)); course.setCapArt(cursor.getInt(i + 28)); course.setDownload(cursor.getShort(i + 29) != 0); course.setDownloadTime(cursor.getLong(i + 30)); course.setUseable(cursor.getShort(i + 31) != 0); int i14 = i + 32; course.setCourseThumbnail(cursor.isNull(i14) ? null : cursor.getString(i14)); int i15 = i + 33; course.setCourseThumbnailLock(cursor.isNull(i15) ? null : cursor.getString(i15)); int i16 = i + 34; course.setStatus(cursor.isNull(i16) ? null : cursor.getString(i16)); course.setRobotDownloaded(cursor.getShort(i + 35) != 0); int i17 = i + 36; course.setCommonResource(cursor.isNull(i17) ? null : cursor.getString(i17)); course.setCommonResUpdatedTime(cursor.getLong(i + 37)); int i18 = i + 38; course.setLanguageResource(cursor.isNull(i18) ? null : cursor.getString(i18)); course.setLangResUpdatedTime(cursor.getLong(i + 39)); } /* JADX INFO: Access modifiers changed from: protected */ @Override // org.greenrobot.greendao.AbstractDao public final Long a(Course course, long j) { course.setId(j); return Long.valueOf(j); } @Override // org.greenrobot.greendao.AbstractDao /* renamed from: a, reason: merged with bridge method [inline-methods] */ public Long d(Course course) { if (course != null) { return Long.valueOf(course.getId()); } return null; } }