228 lines
10 KiB
Java
228 lines
10 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.JimuMotion;
|
|
import com.ubt.jimu.controller.data.widget.ActionWidgetData;
|
|
import com.ubt.jimu.unity.bluetooth.UnityActivity;
|
|
import java.util.ArrayList;
|
|
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 JimuMotionDao extends AbstractDao<JimuMotion, Long> {
|
|
public static final String TABLENAME = "JIMU_MOTION";
|
|
private final JimuMotion.JimuServoConverter i;
|
|
|
|
public static class Properties {
|
|
public static final Property LocalId = new Property(0, Long.class, "localId", true, FileDownloadModel.ID);
|
|
public static final Property ModelType = new Property(1, String.class, UnityActivity.pModelType, false, "MODEL_TYPE");
|
|
public static final Property CustomModelId = new Property(2, String.class, "customModelId", false, "CUSTOM_MODEL_ID");
|
|
public static final Property IsDeleted = new Property(3, String.class, "isDeleted", false, "IS_DELETED");
|
|
public static final Property ModelId = new Property(4, Integer.TYPE, "modelId", false, "MODEL_ID");
|
|
public static final Property IsUploadService = new Property(5, Boolean.TYPE, "isUploadService", false, "IS_UPLOAD_SERVICE");
|
|
public static final Property LastUploadTime = new Property(6, Long.TYPE, "lastUploadTime", false, "LAST_UPLOAD_TIME");
|
|
public static final Property IsFirst = new Property(7, Integer.TYPE, "isFirst", false, "IS_FIRST");
|
|
public static final Property ActionName = new Property(8, String.class, "actionName", false, "ACTION_NAME");
|
|
public static final Property ActionID = new Property(9, String.class, ActionWidgetData.ACTION_ID, false, "ACTION_ID");
|
|
public static final Property UserId = new Property(10, String.class, "userId", false, "USER_ID");
|
|
public static final Property ActionData = new Property(11, String.class, "actionData", false, "ACTION_DATA");
|
|
}
|
|
|
|
public JimuMotionDao(DaoConfig daoConfig, DaoSession daoSession) {
|
|
super(daoConfig, daoSession);
|
|
this.i = new JimuMotion.JimuServoConverter();
|
|
}
|
|
|
|
@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("\"JIMU_MOTION\"");
|
|
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 + "\"JIMU_MOTION\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,\"MODEL_TYPE\" TEXT,\"CUSTOM_MODEL_ID\" TEXT,\"IS_DELETED\" TEXT,\"MODEL_ID\" INTEGER NOT NULL ,\"IS_UPLOAD_SERVICE\" INTEGER NOT NULL ,\"LAST_UPLOAD_TIME\" INTEGER NOT NULL ,\"IS_FIRST\" INTEGER NOT NULL ,\"ACTION_NAME\" TEXT,\"ACTION_ID\" TEXT,\"USER_ID\" TEXT,\"ACTION_DATA\" TEXT);");
|
|
database.a("CREATE UNIQUE INDEX " + str + "IDX_JIMU_MOTION_ACTION_ID ON \"JIMU_MOTION\" (\"ACTION_ID\" ASC);");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(DatabaseStatement databaseStatement, JimuMotion jimuMotion) {
|
|
databaseStatement.a();
|
|
Long localId = jimuMotion.getLocalId();
|
|
if (localId != null) {
|
|
databaseStatement.a(1, localId.longValue());
|
|
}
|
|
String modelType = jimuMotion.getModelType();
|
|
if (modelType != null) {
|
|
databaseStatement.a(2, modelType);
|
|
}
|
|
String customModelId = jimuMotion.getCustomModelId();
|
|
if (customModelId != null) {
|
|
databaseStatement.a(3, customModelId);
|
|
}
|
|
String isDeleted = jimuMotion.getIsDeleted();
|
|
if (isDeleted != null) {
|
|
databaseStatement.a(4, isDeleted);
|
|
}
|
|
databaseStatement.a(5, jimuMotion.getModelId());
|
|
databaseStatement.a(6, jimuMotion.getIsUploadService() ? 1L : 0L);
|
|
databaseStatement.a(7, jimuMotion.getLastUploadTime());
|
|
databaseStatement.a(8, jimuMotion.getIsFirst());
|
|
String actionName = jimuMotion.getActionName();
|
|
if (actionName != null) {
|
|
databaseStatement.a(9, actionName);
|
|
}
|
|
String actionID = jimuMotion.getActionID();
|
|
if (actionID != null) {
|
|
databaseStatement.a(10, actionID);
|
|
}
|
|
String userId = jimuMotion.getUserId();
|
|
if (userId != null) {
|
|
databaseStatement.a(11, userId);
|
|
}
|
|
ArrayList<JimuMotion.JimuServo> actionData = jimuMotion.getActionData();
|
|
if (actionData != null) {
|
|
databaseStatement.a(12, this.i.convertToDatabaseValue(actionData));
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final void a(SQLiteStatement sQLiteStatement, JimuMotion jimuMotion) {
|
|
sQLiteStatement.clearBindings();
|
|
Long localId = jimuMotion.getLocalId();
|
|
if (localId != null) {
|
|
sQLiteStatement.bindLong(1, localId.longValue());
|
|
}
|
|
String modelType = jimuMotion.getModelType();
|
|
if (modelType != null) {
|
|
sQLiteStatement.bindString(2, modelType);
|
|
}
|
|
String customModelId = jimuMotion.getCustomModelId();
|
|
if (customModelId != null) {
|
|
sQLiteStatement.bindString(3, customModelId);
|
|
}
|
|
String isDeleted = jimuMotion.getIsDeleted();
|
|
if (isDeleted != null) {
|
|
sQLiteStatement.bindString(4, isDeleted);
|
|
}
|
|
sQLiteStatement.bindLong(5, jimuMotion.getModelId());
|
|
sQLiteStatement.bindLong(6, jimuMotion.getIsUploadService() ? 1L : 0L);
|
|
sQLiteStatement.bindLong(7, jimuMotion.getLastUploadTime());
|
|
sQLiteStatement.bindLong(8, jimuMotion.getIsFirst());
|
|
String actionName = jimuMotion.getActionName();
|
|
if (actionName != null) {
|
|
sQLiteStatement.bindString(9, actionName);
|
|
}
|
|
String actionID = jimuMotion.getActionID();
|
|
if (actionID != null) {
|
|
sQLiteStatement.bindString(10, actionID);
|
|
}
|
|
String userId = jimuMotion.getUserId();
|
|
if (userId != null) {
|
|
sQLiteStatement.bindString(11, userId);
|
|
}
|
|
ArrayList<JimuMotion.JimuServo> actionData = jimuMotion.getActionData();
|
|
if (actionData != null) {
|
|
sQLiteStatement.bindString(12, this.i.convertToDatabaseValue(actionData));
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public JimuMotion a(Cursor cursor, int i) {
|
|
String str;
|
|
ArrayList<JimuMotion.JimuServo> convertToEntityProperty;
|
|
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);
|
|
int i5 = i + 3;
|
|
String string3 = cursor.isNull(i5) ? null : cursor.getString(i5);
|
|
int i6 = cursor.getInt(i + 4);
|
|
boolean z = cursor.getShort(i + 5) != 0;
|
|
long j = cursor.getLong(i + 6);
|
|
int i7 = cursor.getInt(i + 7);
|
|
int i8 = i + 8;
|
|
String string4 = cursor.isNull(i8) ? null : cursor.getString(i8);
|
|
int i9 = i + 9;
|
|
String string5 = cursor.isNull(i9) ? null : cursor.getString(i9);
|
|
int i10 = i + 10;
|
|
String string6 = cursor.isNull(i10) ? null : cursor.getString(i10);
|
|
int i11 = i + 11;
|
|
if (cursor.isNull(i11)) {
|
|
str = string6;
|
|
convertToEntityProperty = null;
|
|
} else {
|
|
str = string6;
|
|
convertToEntityProperty = this.i.convertToEntityProperty(cursor.getString(i11));
|
|
}
|
|
return new JimuMotion(valueOf, string, string2, string3, i6, z, j, i7, string4, string5, str, convertToEntityProperty);
|
|
}
|
|
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public void a(Cursor cursor, JimuMotion jimuMotion, int i) {
|
|
int i2 = i + 0;
|
|
jimuMotion.setLocalId(cursor.isNull(i2) ? null : Long.valueOf(cursor.getLong(i2)));
|
|
int i3 = i + 1;
|
|
jimuMotion.setModelType(cursor.isNull(i3) ? null : cursor.getString(i3));
|
|
int i4 = i + 2;
|
|
jimuMotion.setCustomModelId(cursor.isNull(i4) ? null : cursor.getString(i4));
|
|
int i5 = i + 3;
|
|
jimuMotion.setIsDeleted(cursor.isNull(i5) ? null : cursor.getString(i5));
|
|
jimuMotion.setModelId(cursor.getInt(i + 4));
|
|
jimuMotion.setIsUploadService(cursor.getShort(i + 5) != 0);
|
|
jimuMotion.setLastUploadTime(cursor.getLong(i + 6));
|
|
jimuMotion.setIsFirst(cursor.getInt(i + 7));
|
|
int i6 = i + 8;
|
|
jimuMotion.setActionName(cursor.isNull(i6) ? null : cursor.getString(i6));
|
|
int i7 = i + 9;
|
|
jimuMotion.setActionID(cursor.isNull(i7) ? null : cursor.getString(i7));
|
|
int i8 = i + 10;
|
|
jimuMotion.setUserId(cursor.isNull(i8) ? null : cursor.getString(i8));
|
|
int i9 = i + 11;
|
|
jimuMotion.setActionData(cursor.isNull(i9) ? null : this.i.convertToEntityProperty(cursor.getString(i9)));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // org.greenrobot.greendao.AbstractDao
|
|
public final Long a(JimuMotion jimuMotion, long j) {
|
|
jimuMotion.setLocalId(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(JimuMotion jimuMotion) {
|
|
if (jimuMotion != null) {
|
|
return jimuMotion.getLocalId();
|
|
}
|
|
return null;
|
|
}
|
|
}
|