|
@@ -1,252 +0,0 @@
|
|
|
-package com.wdkl.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 com.wdkl.ncs.android.middleware.dao.entity.DeviceInfoBean;
|
|
|
-
|
|
|
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
|
|
-/**
|
|
|
- * DAO for table "DEVICE_INFO_BEAN".
|
|
|
-*/
|
|
|
-public class DeviceInfoBeanDao extends AbstractDao<DeviceInfoBean, Void> {
|
|
|
-
|
|
|
- public static final String TABLENAME = "DEVICE_INFO_BEAN";
|
|
|
-
|
|
|
- /**
|
|
|
- * Properties of entity DeviceInfoBean.<br/>
|
|
|
- * Can be used for QueryBuilder and for referencing column names.
|
|
|
- */
|
|
|
- public static class Properties {
|
|
|
- public final static Property Id = new Property(0, Integer.class, "id", false, "ID");
|
|
|
- public final static Property PartId = new Property(1, Integer.class, "partId", false, "PART_ID");
|
|
|
- public final static Property DeviceType = new Property(2, Integer.class, "deviceType", false, "DEVICE_TYPE");
|
|
|
- public final static Property Name = new Property(3, String.class, "name", false, "NAME");
|
|
|
- public final static Property SipId = new Property(4, String.class, "sipId", false, "SIP_ID");
|
|
|
- public final static Property SipPassword = new Property(5, String.class, "sipPassword", false, "SIP_PASSWORD");
|
|
|
- public final static Property HospitalId = new Property(6, Integer.class, "hospitalId", false, "HOSPITAL_ID");
|
|
|
- public final static Property HospitalName = new Property(7, String.class, "hospitalName", false, "HOSPITAL_NAME");
|
|
|
- public final static Property PartName = new Property(8, String.class, "partName", false, "PART_NAME");
|
|
|
- public final static Property PartDisplay = new Property(9, String.class, "partDisplay", false, "PART_DISPLAY");
|
|
|
- public final static Property FrameName = new Property(10, String.class, "frameName", false, "FRAME_NAME");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public DeviceInfoBeanDao(DaoConfig config) {
|
|
|
- super(config);
|
|
|
- }
|
|
|
-
|
|
|
- public DeviceInfoBeanDao(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 + "\"DEVICE_INFO_BEAN\" (" + //
|
|
|
- "\"ID\" INTEGER," + // 0: id
|
|
|
- "\"PART_ID\" INTEGER," + // 1: partId
|
|
|
- "\"DEVICE_TYPE\" INTEGER," + // 2: deviceType
|
|
|
- "\"NAME\" TEXT," + // 3: name
|
|
|
- "\"SIP_ID\" TEXT," + // 4: sipId
|
|
|
- "\"SIP_PASSWORD\" TEXT," + // 5: sipPassword
|
|
|
- "\"HOSPITAL_ID\" INTEGER," + // 6: hospitalId
|
|
|
- "\"HOSPITAL_NAME\" TEXT," + // 7: hospitalName
|
|
|
- "\"PART_NAME\" TEXT," + // 8: partName
|
|
|
- "\"PART_DISPLAY\" TEXT," + // 9: partDisplay
|
|
|
- "\"FRAME_NAME\" TEXT);"); // 10: frameName
|
|
|
- }
|
|
|
-
|
|
|
- /** Drops the underlying database table. */
|
|
|
- public static void dropTable(Database db, boolean ifExists) {
|
|
|
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DEVICE_INFO_BEAN\"";
|
|
|
- db.execSQL(sql);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected final void bindValues(DatabaseStatement stmt, DeviceInfoBean entity) {
|
|
|
- stmt.clearBindings();
|
|
|
-
|
|
|
- Integer id = entity.getId();
|
|
|
- if (id != null) {
|
|
|
- stmt.bindLong(1, id);
|
|
|
- }
|
|
|
-
|
|
|
- Integer partId = entity.getPartId();
|
|
|
- if (partId != null) {
|
|
|
- stmt.bindLong(2, partId);
|
|
|
- }
|
|
|
-
|
|
|
- Integer deviceType = entity.getDeviceType();
|
|
|
- if (deviceType != null) {
|
|
|
- stmt.bindLong(3, deviceType);
|
|
|
- }
|
|
|
-
|
|
|
- String name = entity.getName();
|
|
|
- if (name != null) {
|
|
|
- stmt.bindString(4, name);
|
|
|
- }
|
|
|
-
|
|
|
- String sipId = entity.getSipId();
|
|
|
- if (sipId != null) {
|
|
|
- stmt.bindString(5, sipId);
|
|
|
- }
|
|
|
-
|
|
|
- String sipPassword = entity.getSipPassword();
|
|
|
- if (sipPassword != null) {
|
|
|
- stmt.bindString(6, sipPassword);
|
|
|
- }
|
|
|
-
|
|
|
- Integer hospitalId = entity.getHospitalId();
|
|
|
- if (hospitalId != null) {
|
|
|
- stmt.bindLong(7, hospitalId);
|
|
|
- }
|
|
|
-
|
|
|
- String hospitalName = entity.getHospitalName();
|
|
|
- if (hospitalName != null) {
|
|
|
- stmt.bindString(8, hospitalName);
|
|
|
- }
|
|
|
-
|
|
|
- String partName = entity.getPartName();
|
|
|
- if (partName != null) {
|
|
|
- stmt.bindString(9, partName);
|
|
|
- }
|
|
|
-
|
|
|
- String partDisplay = entity.getPartDisplay();
|
|
|
- if (partDisplay != null) {
|
|
|
- stmt.bindString(10, partDisplay);
|
|
|
- }
|
|
|
-
|
|
|
- String frameName = entity.getFrameName();
|
|
|
- if (frameName != null) {
|
|
|
- stmt.bindString(11, frameName);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected final void bindValues(SQLiteStatement stmt, DeviceInfoBean entity) {
|
|
|
- stmt.clearBindings();
|
|
|
-
|
|
|
- Integer id = entity.getId();
|
|
|
- if (id != null) {
|
|
|
- stmt.bindLong(1, id);
|
|
|
- }
|
|
|
-
|
|
|
- Integer partId = entity.getPartId();
|
|
|
- if (partId != null) {
|
|
|
- stmt.bindLong(2, partId);
|
|
|
- }
|
|
|
-
|
|
|
- Integer deviceType = entity.getDeviceType();
|
|
|
- if (deviceType != null) {
|
|
|
- stmt.bindLong(3, deviceType);
|
|
|
- }
|
|
|
-
|
|
|
- String name = entity.getName();
|
|
|
- if (name != null) {
|
|
|
- stmt.bindString(4, name);
|
|
|
- }
|
|
|
-
|
|
|
- String sipId = entity.getSipId();
|
|
|
- if (sipId != null) {
|
|
|
- stmt.bindString(5, sipId);
|
|
|
- }
|
|
|
-
|
|
|
- String sipPassword = entity.getSipPassword();
|
|
|
- if (sipPassword != null) {
|
|
|
- stmt.bindString(6, sipPassword);
|
|
|
- }
|
|
|
-
|
|
|
- Integer hospitalId = entity.getHospitalId();
|
|
|
- if (hospitalId != null) {
|
|
|
- stmt.bindLong(7, hospitalId);
|
|
|
- }
|
|
|
-
|
|
|
- String hospitalName = entity.getHospitalName();
|
|
|
- if (hospitalName != null) {
|
|
|
- stmt.bindString(8, hospitalName);
|
|
|
- }
|
|
|
-
|
|
|
- String partName = entity.getPartName();
|
|
|
- if (partName != null) {
|
|
|
- stmt.bindString(9, partName);
|
|
|
- }
|
|
|
-
|
|
|
- String partDisplay = entity.getPartDisplay();
|
|
|
- if (partDisplay != null) {
|
|
|
- stmt.bindString(10, partDisplay);
|
|
|
- }
|
|
|
-
|
|
|
- String frameName = entity.getFrameName();
|
|
|
- if (frameName != null) {
|
|
|
- stmt.bindString(11, frameName);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public Void readKey(Cursor cursor, int offset) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public DeviceInfoBean readEntity(Cursor cursor, int offset) {
|
|
|
- DeviceInfoBean entity = new DeviceInfoBean( //
|
|
|
- cursor.isNull(offset + 0) ? null : cursor.getInt(offset + 0), // id
|
|
|
- cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1), // partId
|
|
|
- cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // deviceType
|
|
|
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // name
|
|
|
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // sipId
|
|
|
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // sipPassword
|
|
|
- cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // hospitalId
|
|
|
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // hospitalName
|
|
|
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // partName
|
|
|
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // partDisplay
|
|
|
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10) // frameName
|
|
|
- );
|
|
|
- return entity;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void readEntity(Cursor cursor, DeviceInfoBean entity, int offset) {
|
|
|
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getInt(offset + 0));
|
|
|
- entity.setPartId(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1));
|
|
|
- entity.setDeviceType(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
|
|
|
- entity.setName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
|
|
|
- entity.setSipId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
|
|
|
- entity.setSipPassword(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
|
|
- entity.setHospitalId(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
|
|
|
- entity.setHospitalName(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
|
|
|
- entity.setPartName(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
|
|
|
- entity.setPartDisplay(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
|
|
- entity.setFrameName(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected final Void updateKeyAfterInsert(DeviceInfoBean entity, long rowId) {
|
|
|
- // Unsupported or missing PK type
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public Void getKey(DeviceInfoBean entity) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public boolean hasKey(DeviceInfoBean entity) {
|
|
|
- // TODO
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected final boolean isEntityUpdateable() {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
-}
|