fix: 多余提交文件

This commit is contained in:
niushuai233 2022-10-24 16:07:53 +08:00
parent b301ffff70
commit a69338011c

View File

@ -1,190 +0,0 @@
package cc.niushuai.project.devcontrol.db.greendao.gen;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import cc.niushuai.project.devcontrol.db.entity.CommandExt;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "tb_dc_command_ext".
*/
public class CommandExtDao extends AbstractDao<CommandExt, Long> {
public static final String TABLENAME = "tb_dc_command_ext";
/**
* Properties of entity CommandExt.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Id = new Property(0, Long.class, "id", true, "_id");
public final static Property DeviceId = new Property(1, Long.class, "deviceId", false, "DEVICE_ID");
public final static Property Command = new Property(2, String.class, "command", false, "COMMAND");
public final static Property Order = new Property(3, Integer.class, "order", false, "ORDER");
public final static Property Remark = new Property(4, String.class, "remark", false, "REMARK");
public final static Property CreateTime = new Property(5, String.class, "createTime", false, "CREATE_TIME");
}
public CommandExtDao(DaoConfig config) {
super(config);
}
public CommandExtDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"tb_dc_command_ext\" (" + //
"\"_id\" INTEGER PRIMARY KEY ," + // 0: id
"\"DEVICE_ID\" INTEGER," + // 1: deviceId
"\"COMMAND\" TEXT," + // 2: command
"\"ORDER\" INTEGER," + // 3: order
"\"REMARK\" TEXT," + // 4: remark
"\"CREATE_TIME\" TEXT);"); // 5: createTime
// Add Indexes
db.execSQL("CREATE INDEX " + constraint + "IDX_tb_dc_command_ext__id ON \"tb_dc_command_ext\"" +
" (\"_id\" ASC);");
db.execSQL("CREATE INDEX " + constraint + "IDX_tb_dc_command_ext_DEVICE_ID ON \"tb_dc_command_ext\"" +
" (\"DEVICE_ID\" ASC);");
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"tb_dc_command_ext\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, CommandExt entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
Long deviceId = entity.getDeviceId();
if (deviceId != null) {
stmt.bindLong(2, deviceId);
}
String command = entity.getCommand();
if (command != null) {
stmt.bindString(3, command);
}
Integer order = entity.getOrder();
if (order != null) {
stmt.bindLong(4, order);
}
String remark = entity.getRemark();
if (remark != null) {
stmt.bindString(5, remark);
}
String createTime = entity.getCreateTime();
if (createTime != null) {
stmt.bindString(6, createTime);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, CommandExt entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
Long deviceId = entity.getDeviceId();
if (deviceId != null) {
stmt.bindLong(2, deviceId);
}
String command = entity.getCommand();
if (command != null) {
stmt.bindString(3, command);
}
Integer order = entity.getOrder();
if (order != null) {
stmt.bindLong(4, order);
}
String remark = entity.getRemark();
if (remark != null) {
stmt.bindString(5, remark);
}
String createTime = entity.getCreateTime();
if (createTime != null) {
stmt.bindString(6, createTime);
}
}
@Override
public Long readKey(Cursor cursor, int offset) {
return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
}
@Override
public CommandExt readEntity(Cursor cursor, int offset) {
CommandExt entity = new CommandExt( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // deviceId
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // command
cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3), // order
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // remark
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5) // createTime
);
return entity;
}
@Override
public void readEntity(Cursor cursor, CommandExt entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setDeviceId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
entity.setCommand(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setOrder(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
entity.setRemark(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setCreateTime(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
}
@Override
protected final Long updateKeyAfterInsert(CommandExt entity, long rowId) {
entity.setId(rowId);
return rowId;
}
@Override
public Long getKey(CommandExt entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
@Override
public boolean hasKey(CommandExt entity) {
return entity.getId() != null;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}