| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- 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<NetReConnectEntity, Long> {
- public static final String TABLENAME = "NET_RE_CONNECT_ENTITY";
- /**
- * Properties of entity NetReConnectEntity.<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 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 Type = new Property(4, int.class, "type", false, "TYPE");
- public final static Property IsWarning = new Property(5, 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
- "\"TYPE\" INTEGER NOT NULL ," + // 4: type
- "\"IS_WARNING\" INTEGER NOT NULL );"); // 5: 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);
- }
- stmt.bindLong(5, entity.getType());
- stmt.bindLong(6, 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);
- }
- stmt.bindLong(5, entity.getType());
- stmt.bindLong(6, 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.getInt(offset + 4), // type
- cursor.getShort(offset + 5) != 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.setType(cursor.getInt(offset + 4));
- entity.setIsWarning(cursor.getShort(offset + 5) != 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;
- }
-
- }
|