257 lines
12 KiB
Java
257 lines
12 KiB
Java
package com.ubt.jimu.gen;
|
|
|
|
import android.database.Cursor;
|
|
import android.database.sqlite.SQLiteStatement;
|
|
import com.liulishuo.filedownloader.model.FileDownloadModel;
|
|
import com.ubt.jimu.blockly.bean.BlocklyProject;
|
|
import com.ubt.jimu.controller.data.widget.JockstickDataConverter;
|
|
import com.ubt.jimu.unity.bluetooth.UnityActivity;
|
|
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 BlocklyProjectDao extends AbstractDao<BlocklyProject, Long> {
|
|
public static final String TABLENAME = "BLOCKLY_PROJECT";
|
|
|
|
public static class Properties {
|
|
public static final Property Id = new Property(0, Long.class, JockstickDataConverter.ID, true, FileDownloadModel.ID);
|
|
public static final Property UserId = new Property(1, String.class, "userId", false, "USER_ID");
|
|
public static final Property XmlId = new Property(2, String.class, "xmlId", false, "XML_ID");
|
|
public static final Property IsModify = new Property(3, Boolean.TYPE, "isModify", false, "IS_MODIFY");
|
|
public static final Property IsUploadQiNiu = new Property(4, Boolean.TYPE, "isUploadQiNiu", false, "IS_UPLOAD_QI_NIU");
|
|
public static final Property IsUploadService = new Property(5, Boolean.TYPE, "isUploadService", false, "IS_UPLOAD_SERVICE");
|
|
public static final Property XmlName = new Property(6, String.class, "xmlName", false, "XML_NAME");
|
|
public static final Property IsFirst = new Property(7, Integer.TYPE, "isFirst", false, "IS_FIRST");
|
|
public static final Property XmlContent = new Property(8, String.class, "xmlContent", false, "XML_CONTENT");
|
|
public static final Property LastUploadTime = new Property(9, Long.TYPE, "lastUploadTime", false, "LAST_UPLOAD_TIME");
|
|
public static final Property IsDefault = new Property(10, Boolean.TYPE, "isDefault", false, "IS_DEFAULT");
|
|
public static final Property BlocklyVersion = new Property(11, String.class, "blocklyVersion", false, "BLOCKLY_VERSION");
|
|
public static final Property BlocklyType = new Property(12, String.class, "blocklyType", false, "BLOCKLY_TYPE");
|
|
public static final Property ModelType = new Property(13, String.class, UnityActivity.pModelType, false, "MODEL_TYPE");
|
|
public static final Property ModelId = new Property(14, Long.TYPE, "modelId", false, "MODEL_ID");
|
|
public static final Property CustomModelId = new Property(15, String.class, "customModelId", false, "CUSTOM_MODEL_ID");
|
|
public static final Property IsDeleted = new Property(16, String.class, "isDeleted", false, "IS_DELETED");
|
|
}
|
|
|
|
public BlocklyProjectDao(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("\"BLOCKLY_PROJECT\"");
|
|
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) {
|
|
int i2 = i + 0;
|
|
if (cursor.isNull(i2)) {
|
|
return null;
|
|
}
|
|
return Long.valueOf(cursor.getLong(i2));
|
|
}
|
|
|
|
public static void a(Database database, boolean z) {
|
|
String str = z ? "IF NOT EXISTS " : "";
|
|
database.a("CREATE TABLE " + str + "\"BLOCKLY_PROJECT\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,\"USER_ID\" TEXT,\"XML_ID\" TEXT,\"IS_MODIFY\" INTEGER NOT NULL ,\"IS_UPLOAD_QI_NIU\" INTEGER NOT NULL ,\"IS_UPLOAD_SERVICE\" INTEGER NOT NULL ,\"XML_NAME\" TEXT,\"IS_FIRST\" INTEGER NOT NULL ,\"XML_CONTENT\" TEXT,\"LAST_UPLOAD_TIME\" INTEGER NOT NULL ,\"IS_DEFAULT\" INTEGER NOT NULL ,\"BLOCKLY_VERSION\" TEXT,\"BLOCKLY_TYPE\" TEXT,\"MODEL_TYPE\" TEXT,\"MODEL_ID\" INTEGER NOT NULL ,\"CUSTOM_MODEL_ID\" TEXT,\"IS_DELETED\" TEXT);");
|
|
database.a("CREATE UNIQUE INDEX " + str + "IDX_BLOCKLY_PROJECT_XML_ID ON \"BLOCKLY_PROJECT\" (\"XML_ID\" ASC);");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(DatabaseStatement databaseStatement, BlocklyProject blocklyProject) {
|
|
databaseStatement.a();
|
|
Long id = blocklyProject.getId();
|
|
if (id != null) {
|
|
databaseStatement.a(1, id.longValue());
|
|
}
|
|
String userId = blocklyProject.getUserId();
|
|
if (userId != null) {
|
|
databaseStatement.a(2, userId);
|
|
}
|
|
String xmlId = blocklyProject.getXmlId();
|
|
if (xmlId != null) {
|
|
databaseStatement.a(3, xmlId);
|
|
}
|
|
databaseStatement.a(4, blocklyProject.getIsModify() ? 1L : 0L);
|
|
databaseStatement.a(5, blocklyProject.getIsUploadQiNiu() ? 1L : 0L);
|
|
databaseStatement.a(6, blocklyProject.getIsUploadService() ? 1L : 0L);
|
|
String xmlName = blocklyProject.getXmlName();
|
|
if (xmlName != null) {
|
|
databaseStatement.a(7, xmlName);
|
|
}
|
|
databaseStatement.a(8, blocklyProject.getIsFirst());
|
|
String xmlContent = blocklyProject.getXmlContent();
|
|
if (xmlContent != null) {
|
|
databaseStatement.a(9, xmlContent);
|
|
}
|
|
databaseStatement.a(10, blocklyProject.getLastUploadTime());
|
|
databaseStatement.a(11, blocklyProject.getIsDefault() ? 1L : 0L);
|
|
String blocklyVersion = blocklyProject.getBlocklyVersion();
|
|
if (blocklyVersion != null) {
|
|
databaseStatement.a(12, blocklyVersion);
|
|
}
|
|
String blocklyType = blocklyProject.getBlocklyType();
|
|
if (blocklyType != null) {
|
|
databaseStatement.a(13, blocklyType);
|
|
}
|
|
String modelType = blocklyProject.getModelType();
|
|
if (modelType != null) {
|
|
databaseStatement.a(14, modelType);
|
|
}
|
|
databaseStatement.a(15, blocklyProject.getModelId());
|
|
String customModelId = blocklyProject.getCustomModelId();
|
|
if (customModelId != null) {
|
|
databaseStatement.a(16, customModelId);
|
|
}
|
|
String isDeleted = blocklyProject.getIsDeleted();
|
|
if (isDeleted != null) {
|
|
databaseStatement.a(17, isDeleted);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(SQLiteStatement sQLiteStatement, BlocklyProject blocklyProject) {
|
|
sQLiteStatement.clearBindings();
|
|
Long id = blocklyProject.getId();
|
|
if (id != null) {
|
|
sQLiteStatement.bindLong(1, id.longValue());
|
|
}
|
|
String userId = blocklyProject.getUserId();
|
|
if (userId != null) {
|
|
sQLiteStatement.bindString(2, userId);
|
|
}
|
|
String xmlId = blocklyProject.getXmlId();
|
|
if (xmlId != null) {
|
|
sQLiteStatement.bindString(3, xmlId);
|
|
}
|
|
sQLiteStatement.bindLong(4, blocklyProject.getIsModify() ? 1L : 0L);
|
|
sQLiteStatement.bindLong(5, blocklyProject.getIsUploadQiNiu() ? 1L : 0L);
|
|
sQLiteStatement.bindLong(6, blocklyProject.getIsUploadService() ? 1L : 0L);
|
|
String xmlName = blocklyProject.getXmlName();
|
|
if (xmlName != null) {
|
|
sQLiteStatement.bindString(7, xmlName);
|
|
}
|
|
sQLiteStatement.bindLong(8, blocklyProject.getIsFirst());
|
|
String xmlContent = blocklyProject.getXmlContent();
|
|
if (xmlContent != null) {
|
|
sQLiteStatement.bindString(9, xmlContent);
|
|
}
|
|
sQLiteStatement.bindLong(10, blocklyProject.getLastUploadTime());
|
|
sQLiteStatement.bindLong(11, blocklyProject.getIsDefault() ? 1L : 0L);
|
|
String blocklyVersion = blocklyProject.getBlocklyVersion();
|
|
if (blocklyVersion != null) {
|
|
sQLiteStatement.bindString(12, blocklyVersion);
|
|
}
|
|
String blocklyType = blocklyProject.getBlocklyType();
|
|
if (blocklyType != null) {
|
|
sQLiteStatement.bindString(13, blocklyType);
|
|
}
|
|
String modelType = blocklyProject.getModelType();
|
|
if (modelType != null) {
|
|
sQLiteStatement.bindString(14, modelType);
|
|
}
|
|
sQLiteStatement.bindLong(15, blocklyProject.getModelId());
|
|
String customModelId = blocklyProject.getCustomModelId();
|
|
if (customModelId != null) {
|
|
sQLiteStatement.bindString(16, customModelId);
|
|
}
|
|
String isDeleted = blocklyProject.getIsDeleted();
|
|
if (isDeleted != null) {
|
|
sQLiteStatement.bindString(17, isDeleted);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public BlocklyProject a(Cursor cursor, int i) {
|
|
int i2 = i + 0;
|
|
Long valueOf = cursor.isNull(i2) ? null : Long.valueOf(cursor.getLong(i2));
|
|
int i3 = i + 1;
|
|
String string = cursor.isNull(i3) ? null : cursor.getString(i3);
|
|
int i4 = i + 2;
|
|
String string2 = cursor.isNull(i4) ? null : cursor.getString(i4);
|
|
boolean z = cursor.getShort(i + 3) != 0;
|
|
boolean z2 = cursor.getShort(i + 4) != 0;
|
|
boolean z3 = cursor.getShort(i + 5) != 0;
|
|
int i5 = i + 6;
|
|
String string3 = cursor.isNull(i5) ? null : cursor.getString(i5);
|
|
int i6 = cursor.getInt(i + 7);
|
|
int i7 = i + 8;
|
|
String string4 = cursor.isNull(i7) ? null : cursor.getString(i7);
|
|
long j = cursor.getLong(i + 9);
|
|
boolean z4 = cursor.getShort(i + 10) != 0;
|
|
int i8 = i + 11;
|
|
String string5 = cursor.isNull(i8) ? null : cursor.getString(i8);
|
|
int i9 = i + 12;
|
|
String string6 = cursor.isNull(i9) ? null : cursor.getString(i9);
|
|
int i10 = i + 13;
|
|
String string7 = cursor.isNull(i10) ? null : cursor.getString(i10);
|
|
long j2 = cursor.getLong(i + 14);
|
|
int i11 = i + 15;
|
|
String string8 = cursor.isNull(i11) ? null : cursor.getString(i11);
|
|
int i12 = i + 16;
|
|
return new BlocklyProject(valueOf, string, string2, z, z2, z3, string3, i6, string4, j, z4, string5, string6, string7, j2, string8, cursor.isNull(i12) ? null : cursor.getString(i12));
|
|
}
|
|
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public void a(Cursor cursor, BlocklyProject blocklyProject, int i) {
|
|
int i2 = i + 0;
|
|
blocklyProject.setId(cursor.isNull(i2) ? null : Long.valueOf(cursor.getLong(i2)));
|
|
int i3 = i + 1;
|
|
blocklyProject.setUserId(cursor.isNull(i3) ? null : cursor.getString(i3));
|
|
int i4 = i + 2;
|
|
blocklyProject.setXmlId(cursor.isNull(i4) ? null : cursor.getString(i4));
|
|
blocklyProject.setIsModify(cursor.getShort(i + 3) != 0);
|
|
blocklyProject.setIsUploadQiNiu(cursor.getShort(i + 4) != 0);
|
|
blocklyProject.setIsUploadService(cursor.getShort(i + 5) != 0);
|
|
int i5 = i + 6;
|
|
blocklyProject.setXmlName(cursor.isNull(i5) ? null : cursor.getString(i5));
|
|
blocklyProject.setIsFirst(cursor.getInt(i + 7));
|
|
int i6 = i + 8;
|
|
blocklyProject.setXmlContent(cursor.isNull(i6) ? null : cursor.getString(i6));
|
|
blocklyProject.setLastUploadTime(cursor.getLong(i + 9));
|
|
blocklyProject.setIsDefault(cursor.getShort(i + 10) != 0);
|
|
int i7 = i + 11;
|
|
blocklyProject.setBlocklyVersion(cursor.isNull(i7) ? null : cursor.getString(i7));
|
|
int i8 = i + 12;
|
|
blocklyProject.setBlocklyType(cursor.isNull(i8) ? null : cursor.getString(i8));
|
|
int i9 = i + 13;
|
|
blocklyProject.setModelType(cursor.isNull(i9) ? null : cursor.getString(i9));
|
|
blocklyProject.setModelId(cursor.getLong(i + 14));
|
|
int i10 = i + 15;
|
|
blocklyProject.setCustomModelId(cursor.isNull(i10) ? null : cursor.getString(i10));
|
|
int i11 = i + 16;
|
|
blocklyProject.setIsDeleted(cursor.isNull(i11) ? null : cursor.getString(i11));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final Long a(BlocklyProject blocklyProject, long j) {
|
|
blocklyProject.setId(Long.valueOf(j));
|
|
return Long.valueOf(j);
|
|
}
|
|
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
|
public Long d(BlocklyProject blocklyProject) {
|
|
if (blocklyProject != null) {
|
|
return blocklyProject.getId();
|
|
}
|
|
return null;
|
|
}
|
|
}
|