package com.ping.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 cn.flightfeather.thirdapp.bean.Monitorobjectversion; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "MONITOROBJECTVERSION". */ public class MonitorobjectversionDao extends AbstractDao { public static final String TABLENAME = "MONITOROBJECTVERSION"; /** * Properties of entity Monitorobjectversion.
* Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property Movid = new Property(0, String.class, "movid", true, "MOVID"); public final static Property Tid = new Property(1, String.class, "tid", false, "TID"); public final static Property Sguid = new Property(2, String.class, "sguid", false, "SGUID"); public final static Property Sensename = new Property(3, String.class, "sensename", false, "SENSENAME"); public final static Property Tasktypeid = new Property(4, Byte.class, "tasktypeid", false, "TASKTYPEID"); public final static Property Tasktype = new Property(5, String.class, "tasktype", false, "TASKTYPE"); public final static Property Monitornum = new Property(6, Integer.class, "monitornum", false, "MONITORNUM"); public final static Property Suitable = new Property(7, Boolean.class, "suitable", false, "SUITABLE"); public final static Property Displayid = new Property(8, Integer.class, "displayid", false, "DISPLAYID"); public final static Property Year = new Property(9, Integer.class, "year", false, "YEAR"); public final static Property Month = new Property(10, Integer.class, "month", false, "MONTH"); public final static Property Day = new Property(11, Integer.class, "day", false, "DAY"); public final static Property Iscp = new Property(12, Boolean.class, "iscp", false, "ISCP"); public final static Property Customperiod = new Property(13, String.class, "customperiod", false, "CUSTOMPERIOD"); public final static Property Extension1 = new Property(14, String.class, "extension1", false, "EXTENSION1"); public final static Property Extension2 = new Property(15, String.class, "extension2", false, "EXTENSION2"); public final static Property Extension3 = new Property(16, String.class, "extension3", false, "EXTENSION3"); public final static Property Remark = new Property(17, String.class, "remark", false, "REMARK"); } public MonitorobjectversionDao(DaoConfig config) { super(config); } public MonitorobjectversionDao(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 + "\"MONITOROBJECTVERSION\" (" + // "\"MOVID\" TEXT PRIMARY KEY NOT NULL ," + // 0: movid "\"TID\" TEXT," + // 1: tid "\"SGUID\" TEXT," + // 2: sguid "\"SENSENAME\" TEXT," + // 3: sensename "\"TASKTYPEID\" INTEGER," + // 4: tasktypeid "\"TASKTYPE\" TEXT," + // 5: tasktype "\"MONITORNUM\" INTEGER," + // 6: monitornum "\"SUITABLE\" INTEGER," + // 7: suitable "\"DISPLAYID\" INTEGER," + // 8: displayid "\"YEAR\" INTEGER," + // 9: year "\"MONTH\" INTEGER," + // 10: month "\"DAY\" INTEGER," + // 11: day "\"ISCP\" INTEGER," + // 12: iscp "\"CUSTOMPERIOD\" TEXT," + // 13: customperiod "\"EXTENSION1\" TEXT," + // 14: extension1 "\"EXTENSION2\" TEXT," + // 15: extension2 "\"EXTENSION3\" TEXT," + // 16: extension3 "\"REMARK\" TEXT);"); // 17: remark } /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MONITOROBJECTVERSION\""; db.execSQL(sql); } @Override protected final void bindValues(DatabaseStatement stmt, Monitorobjectversion entity) { stmt.clearBindings(); String movid = entity.getMovid(); if (movid != null) { stmt.bindString(1, movid); } String tid = entity.getTid(); if (tid != null) { stmt.bindString(2, tid); } String sguid = entity.getSguid(); if (sguid != null) { stmt.bindString(3, sguid); } String sensename = entity.getSensename(); if (sensename != null) { stmt.bindString(4, sensename); } Byte tasktypeid = entity.getTasktypeid(); if (tasktypeid != null) { stmt.bindLong(5, tasktypeid); } String tasktype = entity.getTasktype(); if (tasktype != null) { stmt.bindString(6, tasktype); } Integer monitornum = entity.getMonitornum(); if (monitornum != null) { stmt.bindLong(7, monitornum); } Boolean suitable = entity.getSuitable(); if (suitable != null) { stmt.bindLong(8, suitable ? 1L: 0L); } Integer displayid = entity.getDisplayid(); if (displayid != null) { stmt.bindLong(9, displayid); } Integer year = entity.getYear(); if (year != null) { stmt.bindLong(10, year); } Integer month = entity.getMonth(); if (month != null) { stmt.bindLong(11, month); } Integer day = entity.getDay(); if (day != null) { stmt.bindLong(12, day); } Boolean iscp = entity.getIscp(); if (iscp != null) { stmt.bindLong(13, iscp ? 1L: 0L); } String customperiod = entity.getCustomperiod(); if (customperiod != null) { stmt.bindString(14, customperiod); } String extension1 = entity.getExtension1(); if (extension1 != null) { stmt.bindString(15, extension1); } String extension2 = entity.getExtension2(); if (extension2 != null) { stmt.bindString(16, extension2); } String extension3 = entity.getExtension3(); if (extension3 != null) { stmt.bindString(17, extension3); } String remark = entity.getRemark(); if (remark != null) { stmt.bindString(18, remark); } } @Override protected final void bindValues(SQLiteStatement stmt, Monitorobjectversion entity) { stmt.clearBindings(); String movid = entity.getMovid(); if (movid != null) { stmt.bindString(1, movid); } String tid = entity.getTid(); if (tid != null) { stmt.bindString(2, tid); } String sguid = entity.getSguid(); if (sguid != null) { stmt.bindString(3, sguid); } String sensename = entity.getSensename(); if (sensename != null) { stmt.bindString(4, sensename); } Byte tasktypeid = entity.getTasktypeid(); if (tasktypeid != null) { stmt.bindLong(5, tasktypeid); } String tasktype = entity.getTasktype(); if (tasktype != null) { stmt.bindString(6, tasktype); } Integer monitornum = entity.getMonitornum(); if (monitornum != null) { stmt.bindLong(7, monitornum); } Boolean suitable = entity.getSuitable(); if (suitable != null) { stmt.bindLong(8, suitable ? 1L: 0L); } Integer displayid = entity.getDisplayid(); if (displayid != null) { stmt.bindLong(9, displayid); } Integer year = entity.getYear(); if (year != null) { stmt.bindLong(10, year); } Integer month = entity.getMonth(); if (month != null) { stmt.bindLong(11, month); } Integer day = entity.getDay(); if (day != null) { stmt.bindLong(12, day); } Boolean iscp = entity.getIscp(); if (iscp != null) { stmt.bindLong(13, iscp ? 1L: 0L); } String customperiod = entity.getCustomperiod(); if (customperiod != null) { stmt.bindString(14, customperiod); } String extension1 = entity.getExtension1(); if (extension1 != null) { stmt.bindString(15, extension1); } String extension2 = entity.getExtension2(); if (extension2 != null) { stmt.bindString(16, extension2); } String extension3 = entity.getExtension3(); if (extension3 != null) { stmt.bindString(17, extension3); } String remark = entity.getRemark(); if (remark != null) { stmt.bindString(18, remark); } } @Override public String readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0); } @Override public Monitorobjectversion readEntity(Cursor cursor, int offset) { Monitorobjectversion entity = new Monitorobjectversion( // cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // movid cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // tid cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // sguid cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // sensename cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4), // tasktypeid cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // tasktype cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // monitornum cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0, // suitable cursor.isNull(offset + 8) ? null : cursor.getInt(offset + 8), // displayid cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9), // year cursor.isNull(offset + 10) ? null : cursor.getInt(offset + 10), // month cursor.isNull(offset + 11) ? null : cursor.getInt(offset + 11), // day cursor.isNull(offset + 12) ? null : cursor.getShort(offset + 12) != 0, // iscp cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // customperiod cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // extension1 cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // extension2 cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // extension3 cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17) // remark ); return entity; } @Override public void readEntity(Cursor cursor, Monitorobjectversion entity, int offset) { entity.setMovid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0)); entity.setTid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setSguid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setSensename(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setTasktypeid(cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4)); entity.setTasktype(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setMonitornum(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6)); entity.setSuitable(cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0); entity.setDisplayid(cursor.isNull(offset + 8) ? null : cursor.getInt(offset + 8)); entity.setYear(cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9)); entity.setMonth(cursor.isNull(offset + 10) ? null : cursor.getInt(offset + 10)); entity.setDay(cursor.isNull(offset + 11) ? null : cursor.getInt(offset + 11)); entity.setIscp(cursor.isNull(offset + 12) ? null : cursor.getShort(offset + 12) != 0); entity.setCustomperiod(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13)); entity.setExtension1(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14)); entity.setExtension2(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15)); entity.setExtension3(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16)); entity.setRemark(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17)); } @Override protected final String updateKeyAfterInsert(Monitorobjectversion entity, long rowId) { return entity.getMovid(); } @Override public String getKey(Monitorobjectversion entity) { if(entity != null) { return entity.getMovid(); } else { return null; } } @Override public boolean hasKey(Monitorobjectversion entity) { return entity.getMovid() != null; } @Override protected final boolean isEntityUpdateable() { return true; } }