323 lines
16 KiB
Java
323 lines
16 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.base.entities.Robot;
|
|
import com.ubt.jimu.base.entities.RobotPackage;
|
|
import com.ubt.jimu.gen.RobotPackageDao;
|
|
import com.ubt.jimu.unity.bluetooth.UnityActivity;
|
|
import java.util.List;
|
|
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;
|
|
import org.greenrobot.greendao.query.Query;
|
|
import org.greenrobot.greendao.query.QueryBuilder;
|
|
import org.greenrobot.greendao.query.WhereCondition;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class RobotDao extends AbstractDao<Robot, Long> {
|
|
public static final String TABLENAME = "ROBOT";
|
|
private DaoSession i;
|
|
private Query<Robot> j;
|
|
|
|
public static class Properties {
|
|
public static final Property ModelId = new Property(0, Long.TYPE, "modelId", true, FileDownloadModel.ID);
|
|
public static final Property ModelName = new Property(1, String.class, UnityActivity.pModelName, false, "MODEL_NAME");
|
|
public static final Property ActionFileURL = new Property(2, String.class, "actionFileURL", false, "ACTION_FILE_URL");
|
|
public static final Property ImagePath = new Property(3, String.class, "imagePath", false, "IMAGE_PATH");
|
|
public static final Property ModelType = new Property(4, String.class, UnityActivity.pModelType, false, "MODEL_TYPE");
|
|
public static final Property State = new Property(5, Integer.TYPE, "state", false, "STATE");
|
|
public static final Property IsLatest = new Property(6, String.class, "isLatest", false, "IS_LATEST");
|
|
public static final Property CompressImagePath = new Property(7, String.class, "compressImagePath", false, "COMPRESS_IMAGE_PATH");
|
|
public static final Property ModelCreatedTime = new Property(8, Long.TYPE, "modelCreatedTime", false, "MODEL_CREATED_TIME");
|
|
public static final Property ModelCollectNum = new Property(9, Integer.TYPE, "modelCollectNum", false, "MODEL_COLLECT_NUM");
|
|
public static final Property JarUrl = new Property(10, String.class, "jarUrl", false, "JAR_URL");
|
|
public static final Property ModelNameLanguage = new Property(11, String.class, "modelNameLanguage", false, "MODEL_NAME_LANGUAGE");
|
|
public static final Property ModelDescription = new Property(12, String.class, "modelDescription", false, "MODEL_DESCRIPTION");
|
|
public static final Property ModelDescriptionLangeage = new Property(13, String.class, "modelDescriptionLangeage", false, "MODEL_DESCRIPTION_LANGEAGE");
|
|
public static final Property ModelUpdateTime = new Property(14, Long.TYPE, "modelUpdateTime", false, "MODEL_UPDATE_TIME");
|
|
public static final Property FilePath = new Property(15, String.class, "filePath", false, "FILE_PATH");
|
|
public static final Property HasMission = new Property(16, Boolean.TYPE, "hasMission", false, "HAS_MISSION");
|
|
public static final Property AnimationFilePath = new Property(17, String.class, "animationFilePath", false, "ANIMATION_FILE_PATH");
|
|
public static final Property Download = new Property(18, Boolean.TYPE, "download", false, "DOWNLOAD");
|
|
public static final Property MoveType = new Property(19, String.class, "moveType", false, "MOVE_TYPE");
|
|
public static final Property ModelCommentScort = new Property(20, Double.TYPE, "modelCommentScort", false, "MODEL_COMMENT_SCORT");
|
|
}
|
|
|
|
public RobotDao(DaoConfig daoConfig, DaoSession daoSession) {
|
|
super(daoConfig, daoSession);
|
|
this.i = 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("\"ROBOT\"");
|
|
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 + 0));
|
|
}
|
|
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
/* renamed from: b, reason: merged with bridge method [inline-methods] */
|
|
public Long d(Robot robot) {
|
|
if (robot != null) {
|
|
return Long.valueOf(robot.getModelId());
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<Robot> b(long j) {
|
|
synchronized (this) {
|
|
if (this.j == null) {
|
|
QueryBuilder<Robot> k = k();
|
|
k.a(RobotPackage.class, RobotPackageDao.Properties.RobotId).a(RobotPackageDao.Properties.PackageId.a(Long.valueOf(j)), new WhereCondition[0]);
|
|
this.j = k.a();
|
|
}
|
|
}
|
|
Query<Robot> b = this.j.b();
|
|
b.a(0, (Object) Long.valueOf(j));
|
|
return b.c();
|
|
}
|
|
|
|
public static void a(Database database, boolean z) {
|
|
String str = z ? "IF NOT EXISTS " : "";
|
|
database.a("CREATE TABLE " + str + "\"ROBOT\" (\"_id\" INTEGER PRIMARY KEY NOT NULL ,\"MODEL_NAME\" TEXT,\"ACTION_FILE_URL\" TEXT,\"IMAGE_PATH\" TEXT,\"MODEL_TYPE\" TEXT,\"STATE\" INTEGER NOT NULL ,\"IS_LATEST\" TEXT,\"COMPRESS_IMAGE_PATH\" TEXT,\"MODEL_CREATED_TIME\" INTEGER NOT NULL ,\"MODEL_COLLECT_NUM\" INTEGER NOT NULL ,\"JAR_URL\" TEXT,\"MODEL_NAME_LANGUAGE\" TEXT,\"MODEL_DESCRIPTION\" TEXT,\"MODEL_DESCRIPTION_LANGEAGE\" TEXT,\"MODEL_UPDATE_TIME\" INTEGER NOT NULL ,\"FILE_PATH\" TEXT,\"HAS_MISSION\" INTEGER NOT NULL ,\"ANIMATION_FILE_PATH\" TEXT,\"DOWNLOAD\" INTEGER NOT NULL ,\"MOVE_TYPE\" TEXT,\"MODEL_COMMENT_SCORT\" REAL NOT NULL );");
|
|
database.a("CREATE UNIQUE INDEX " + str + "IDX_ROBOT__id ON \"ROBOT\" (\"_id\" ASC);");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(DatabaseStatement databaseStatement, Robot robot) {
|
|
databaseStatement.a();
|
|
databaseStatement.a(1, robot.getModelId());
|
|
String modelName = robot.getModelName();
|
|
if (modelName != null) {
|
|
databaseStatement.a(2, modelName);
|
|
}
|
|
String actionFileURL = robot.getActionFileURL();
|
|
if (actionFileURL != null) {
|
|
databaseStatement.a(3, actionFileURL);
|
|
}
|
|
String imagePath = robot.getImagePath();
|
|
if (imagePath != null) {
|
|
databaseStatement.a(4, imagePath);
|
|
}
|
|
String modelType = robot.getModelType();
|
|
if (modelType != null) {
|
|
databaseStatement.a(5, modelType);
|
|
}
|
|
databaseStatement.a(6, robot.getState());
|
|
String isLatest = robot.getIsLatest();
|
|
if (isLatest != null) {
|
|
databaseStatement.a(7, isLatest);
|
|
}
|
|
String compressImagePath = robot.getCompressImagePath();
|
|
if (compressImagePath != null) {
|
|
databaseStatement.a(8, compressImagePath);
|
|
}
|
|
databaseStatement.a(9, robot.getModelCreatedTime());
|
|
databaseStatement.a(10, robot.getModelCollectNum());
|
|
String jarUrl = robot.getJarUrl();
|
|
if (jarUrl != null) {
|
|
databaseStatement.a(11, jarUrl);
|
|
}
|
|
String modelNameLanguage = robot.getModelNameLanguage();
|
|
if (modelNameLanguage != null) {
|
|
databaseStatement.a(12, modelNameLanguage);
|
|
}
|
|
String modelDescription = robot.getModelDescription();
|
|
if (modelDescription != null) {
|
|
databaseStatement.a(13, modelDescription);
|
|
}
|
|
String modelDescriptionLangeage = robot.getModelDescriptionLangeage();
|
|
if (modelDescriptionLangeage != null) {
|
|
databaseStatement.a(14, modelDescriptionLangeage);
|
|
}
|
|
databaseStatement.a(15, robot.getModelUpdateTime());
|
|
String filePath = robot.getFilePath();
|
|
if (filePath != null) {
|
|
databaseStatement.a(16, filePath);
|
|
}
|
|
databaseStatement.a(17, robot.getHasMission() ? 1L : 0L);
|
|
String animationFilePath = robot.getAnimationFilePath();
|
|
if (animationFilePath != null) {
|
|
databaseStatement.a(18, animationFilePath);
|
|
}
|
|
databaseStatement.a(19, robot.getDownload() ? 1L : 0L);
|
|
String moveType = robot.getMoveType();
|
|
if (moveType != null) {
|
|
databaseStatement.a(20, moveType);
|
|
}
|
|
databaseStatement.a(21, robot.getModelCommentScort());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(SQLiteStatement sQLiteStatement, Robot robot) {
|
|
sQLiteStatement.clearBindings();
|
|
sQLiteStatement.bindLong(1, robot.getModelId());
|
|
String modelName = robot.getModelName();
|
|
if (modelName != null) {
|
|
sQLiteStatement.bindString(2, modelName);
|
|
}
|
|
String actionFileURL = robot.getActionFileURL();
|
|
if (actionFileURL != null) {
|
|
sQLiteStatement.bindString(3, actionFileURL);
|
|
}
|
|
String imagePath = robot.getImagePath();
|
|
if (imagePath != null) {
|
|
sQLiteStatement.bindString(4, imagePath);
|
|
}
|
|
String modelType = robot.getModelType();
|
|
if (modelType != null) {
|
|
sQLiteStatement.bindString(5, modelType);
|
|
}
|
|
sQLiteStatement.bindLong(6, robot.getState());
|
|
String isLatest = robot.getIsLatest();
|
|
if (isLatest != null) {
|
|
sQLiteStatement.bindString(7, isLatest);
|
|
}
|
|
String compressImagePath = robot.getCompressImagePath();
|
|
if (compressImagePath != null) {
|
|
sQLiteStatement.bindString(8, compressImagePath);
|
|
}
|
|
sQLiteStatement.bindLong(9, robot.getModelCreatedTime());
|
|
sQLiteStatement.bindLong(10, robot.getModelCollectNum());
|
|
String jarUrl = robot.getJarUrl();
|
|
if (jarUrl != null) {
|
|
sQLiteStatement.bindString(11, jarUrl);
|
|
}
|
|
String modelNameLanguage = robot.getModelNameLanguage();
|
|
if (modelNameLanguage != null) {
|
|
sQLiteStatement.bindString(12, modelNameLanguage);
|
|
}
|
|
String modelDescription = robot.getModelDescription();
|
|
if (modelDescription != null) {
|
|
sQLiteStatement.bindString(13, modelDescription);
|
|
}
|
|
String modelDescriptionLangeage = robot.getModelDescriptionLangeage();
|
|
if (modelDescriptionLangeage != null) {
|
|
sQLiteStatement.bindString(14, modelDescriptionLangeage);
|
|
}
|
|
sQLiteStatement.bindLong(15, robot.getModelUpdateTime());
|
|
String filePath = robot.getFilePath();
|
|
if (filePath != null) {
|
|
sQLiteStatement.bindString(16, filePath);
|
|
}
|
|
sQLiteStatement.bindLong(17, robot.getHasMission() ? 1L : 0L);
|
|
String animationFilePath = robot.getAnimationFilePath();
|
|
if (animationFilePath != null) {
|
|
sQLiteStatement.bindString(18, animationFilePath);
|
|
}
|
|
sQLiteStatement.bindLong(19, robot.getDownload() ? 1L : 0L);
|
|
String moveType = robot.getMoveType();
|
|
if (moveType != null) {
|
|
sQLiteStatement.bindString(20, moveType);
|
|
}
|
|
sQLiteStatement.bindDouble(21, robot.getModelCommentScort());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(Robot robot) {
|
|
super.a((RobotDao) robot);
|
|
robot.__setDaoSession(this.i);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public Robot a(Cursor cursor, int i) {
|
|
long j = cursor.getLong(i + 0);
|
|
int i2 = i + 1;
|
|
String string = cursor.isNull(i2) ? null : cursor.getString(i2);
|
|
int i3 = i + 2;
|
|
String string2 = cursor.isNull(i3) ? null : cursor.getString(i3);
|
|
int i4 = i + 3;
|
|
String string3 = cursor.isNull(i4) ? null : cursor.getString(i4);
|
|
int i5 = i + 4;
|
|
String string4 = cursor.isNull(i5) ? null : cursor.getString(i5);
|
|
int i6 = cursor.getInt(i + 5);
|
|
int i7 = i + 6;
|
|
String string5 = cursor.isNull(i7) ? null : cursor.getString(i7);
|
|
int i8 = i + 7;
|
|
String string6 = cursor.isNull(i8) ? null : cursor.getString(i8);
|
|
long j2 = cursor.getLong(i + 8);
|
|
int i9 = cursor.getInt(i + 9);
|
|
int i10 = i + 10;
|
|
String string7 = cursor.isNull(i10) ? null : cursor.getString(i10);
|
|
int i11 = i + 11;
|
|
String string8 = cursor.isNull(i11) ? null : cursor.getString(i11);
|
|
int i12 = i + 12;
|
|
String string9 = cursor.isNull(i12) ? null : cursor.getString(i12);
|
|
int i13 = i + 13;
|
|
String string10 = cursor.isNull(i13) ? null : cursor.getString(i13);
|
|
long j3 = cursor.getLong(i + 14);
|
|
int i14 = i + 15;
|
|
String string11 = cursor.isNull(i14) ? null : cursor.getString(i14);
|
|
boolean z = cursor.getShort(i + 16) != 0;
|
|
int i15 = i + 17;
|
|
String string12 = cursor.isNull(i15) ? null : cursor.getString(i15);
|
|
int i16 = i + 19;
|
|
return new Robot(j, string, string2, string3, string4, i6, string5, string6, j2, i9, string7, string8, string9, string10, j3, string11, z, string12, cursor.getShort(i + 18) != 0, cursor.isNull(i16) ? null : cursor.getString(i16), cursor.getDouble(i + 20));
|
|
}
|
|
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public void a(Cursor cursor, Robot robot, int i) {
|
|
robot.setModelId(cursor.getLong(i + 0));
|
|
int i2 = i + 1;
|
|
robot.setModelName(cursor.isNull(i2) ? null : cursor.getString(i2));
|
|
int i3 = i + 2;
|
|
robot.setActionFileURL(cursor.isNull(i3) ? null : cursor.getString(i3));
|
|
int i4 = i + 3;
|
|
robot.setImagePath(cursor.isNull(i4) ? null : cursor.getString(i4));
|
|
int i5 = i + 4;
|
|
robot.setModelType(cursor.isNull(i5) ? null : cursor.getString(i5));
|
|
robot.setState(cursor.getInt(i + 5));
|
|
int i6 = i + 6;
|
|
robot.setIsLatest(cursor.isNull(i6) ? null : cursor.getString(i6));
|
|
int i7 = i + 7;
|
|
robot.setCompressImagePath(cursor.isNull(i7) ? null : cursor.getString(i7));
|
|
robot.setModelCreatedTime(cursor.getLong(i + 8));
|
|
robot.setModelCollectNum(cursor.getInt(i + 9));
|
|
int i8 = i + 10;
|
|
robot.setJarUrl(cursor.isNull(i8) ? null : cursor.getString(i8));
|
|
int i9 = i + 11;
|
|
robot.setModelNameLanguage(cursor.isNull(i9) ? null : cursor.getString(i9));
|
|
int i10 = i + 12;
|
|
robot.setModelDescription(cursor.isNull(i10) ? null : cursor.getString(i10));
|
|
int i11 = i + 13;
|
|
robot.setModelDescriptionLangeage(cursor.isNull(i11) ? null : cursor.getString(i11));
|
|
robot.setModelUpdateTime(cursor.getLong(i + 14));
|
|
int i12 = i + 15;
|
|
robot.setFilePath(cursor.isNull(i12) ? null : cursor.getString(i12));
|
|
robot.setHasMission(cursor.getShort(i + 16) != 0);
|
|
int i13 = i + 17;
|
|
robot.setAnimationFilePath(cursor.isNull(i13) ? null : cursor.getString(i13));
|
|
robot.setDownload(cursor.getShort(i + 18) != 0);
|
|
int i14 = i + 19;
|
|
robot.setMoveType(cursor.isNull(i14) ? null : cursor.getString(i14));
|
|
robot.setModelCommentScort(cursor.getDouble(i + 20));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final Long a(Robot robot, long j) {
|
|
robot.setModelId(j);
|
|
return Long.valueOf(j);
|
|
}
|
|
}
|