package greendao; 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 eVVM.apk.entity.NetReConnectEntity; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "NET_RE_CONNECT_ENTITY". */ public class NetReConnectEntityDao extends AbstractDao { public static final String TABLENAME = "NET_RE_CONNECT_ENTITY"; /** * Properties of entity NetReConnectEntity.
* 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 InterfaceName = new Property(1, String.class, "interfaceName", false, "INTERFACE_NAME"); public final static Property InterfaceUrl = new Property(2, String.class, "interfaceUrl", false, "INTERFACE_URL"); public final static Property Jsonmap = new Property(3, String.class, "jsonmap", false, "JSONMAP"); public final static Property Inoculator = new Property(4, String.class, "inoculator", false, "INOCULATOR"); public final static Property Type = new Property(5, int.class, "type", false, "TYPE"); public final static Property IsWarning = new Property(6, boolean.class, "isWarning", false, "IS_WARNING"); } public NetReConnectEntityDao(DaoConfig config) { super(config); } public NetReConnectEntityDao(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 + "\"NET_RE_CONNECT_ENTITY\" (" + // "\"_id\" INTEGER PRIMARY KEY ," + // 0: id "\"INTERFACE_NAME\" TEXT," + // 1: interfaceName "\"INTERFACE_URL\" TEXT," + // 2: interfaceUrl "\"JSONMAP\" TEXT," + // 3: jsonmap "\"INOCULATOR\" TEXT," + // 4: inoculator "\"TYPE\" INTEGER NOT NULL ," + // 5: type "\"IS_WARNING\" INTEGER NOT NULL );"); // 6: isWarning } /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"NET_RE_CONNECT_ENTITY\""; db.execSQL(sql); } @Override protected final void bindValues(DatabaseStatement stmt, NetReConnectEntity entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } String interfaceName = entity.getInterfaceName(); if (interfaceName != null) { stmt.bindString(2, interfaceName); } String interfaceUrl = entity.getInterfaceUrl(); if (interfaceUrl != null) { stmt.bindString(3, interfaceUrl); } String jsonmap = entity.getJsonmap(); if (jsonmap != null) { stmt.bindString(4, jsonmap); } String inoculator = entity.getInoculator(); if (inoculator != null) { stmt.bindString(5, inoculator); } stmt.bindLong(6, entity.getType()); stmt.bindLong(7, entity.getIsWarning() ? 1L: 0L); } @Override protected final void bindValues(SQLiteStatement stmt, NetReConnectEntity entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } String interfaceName = entity.getInterfaceName(); if (interfaceName != null) { stmt.bindString(2, interfaceName); } String interfaceUrl = entity.getInterfaceUrl(); if (interfaceUrl != null) { stmt.bindString(3, interfaceUrl); } String jsonmap = entity.getJsonmap(); if (jsonmap != null) { stmt.bindString(4, jsonmap); } String inoculator = entity.getInoculator(); if (inoculator != null) { stmt.bindString(5, inoculator); } stmt.bindLong(6, entity.getType()); stmt.bindLong(7, entity.getIsWarning() ? 1L: 0L); } @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); } @Override public NetReConnectEntity readEntity(Cursor cursor, int offset) { NetReConnectEntity entity = new NetReConnectEntity( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // interfaceName cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // interfaceUrl cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // jsonmap cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // inoculator cursor.getInt(offset + 5), // type cursor.getShort(offset + 6) != 0 // isWarning ); return entity; } @Override public void readEntity(Cursor cursor, NetReConnectEntity entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setInterfaceName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setInterfaceUrl(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setJsonmap(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setInoculator(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setType(cursor.getInt(offset + 5)); entity.setIsWarning(cursor.getShort(offset + 6) != 0); } @Override protected final Long updateKeyAfterInsert(NetReConnectEntity entity, long rowId) { entity.setId(rowId); return rowId; } @Override public Long getKey(NetReConnectEntity entity) { if(entity != null) { return entity.getId(); } else { return null; } } @Override public boolean hasKey(NetReConnectEntity entity) { return entity.getId() != null; } @Override protected final boolean isEntityUpdateable() { return true; } }