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.thirdappmodule.bean.entity.Userinfo; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "USERINFO". */ public class UserinfoDao extends AbstractDao { public static final String TABLENAME = "USERINFO"; /** * Properties of entity Userinfo.
* Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property Guid = new Property(0, String.class, "guid", true, "GUID"); public final static Property Acountname = new Property(1, String.class, "acountname", false, "ACOUNTNAME"); public final static Property Realname = new Property(2, String.class, "realname", false, "REALNAME"); public final static Property Password = new Property(3, String.class, "password", false, "PASSWORD"); public final static Property Usertypeid = new Property(4, Byte.class, "usertypeid", false, "USERTYPEID"); public final static Property Usertype = new Property(5, String.class, "usertype", false, "USERTYPE"); public final static Property Dguid = new Property(6, String.class, "dguid", false, "DGUID"); public final static Property Departmentname = new Property(7, String.class, "departmentname", false, "DEPARTMENTNAME"); public final static Property Isenable = new Property(8, Boolean.class, "isenable", false, "ISENABLE"); public final static Property Workno = new Property(9, String.class, "workno", false, "WORKNO"); public final static Property Telephone = new Property(10, String.class, "telephone", false, "TELEPHONE"); public final static Property Wechatid = new Property(11, String.class, "wechatid", false, "WECHATID"); public final static Property Extension1 = new Property(12, String.class, "extension1", false, "EXTENSION1"); public final static Property Extension2 = new Property(13, String.class, "extension2", false, "EXTENSION2"); public final static Property Extension3 = new Property(14, String.class, "extension3", false, "EXTENSION3"); public final static Property Remark = new Property(15, String.class, "remark", false, "REMARK"); } public UserinfoDao(DaoConfig config) { super(config); } public UserinfoDao(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 + "\"USERINFO\" (" + // "\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid "\"ACOUNTNAME\" TEXT," + // 1: acountname "\"REALNAME\" TEXT," + // 2: realname "\"PASSWORD\" TEXT," + // 3: password "\"USERTYPEID\" INTEGER," + // 4: usertypeid "\"USERTYPE\" TEXT," + // 5: usertype "\"DGUID\" TEXT," + // 6: dguid "\"DEPARTMENTNAME\" TEXT," + // 7: departmentname "\"ISENABLE\" INTEGER," + // 8: isenable "\"WORKNO\" TEXT," + // 9: workno "\"TELEPHONE\" TEXT," + // 10: telephone "\"WECHATID\" TEXT," + // 11: wechatid "\"EXTENSION1\" TEXT," + // 12: extension1 "\"EXTENSION2\" TEXT," + // 13: extension2 "\"EXTENSION3\" TEXT," + // 14: extension3 "\"REMARK\" TEXT);"); // 15: remark } /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"USERINFO\""; db.execSQL(sql); } @Override protected final void bindValues(DatabaseStatement stmt, Userinfo entity) { stmt.clearBindings(); String guid = entity.getGuid(); if (guid != null) { stmt.bindString(1, guid); } String acountname = entity.getAcountname(); if (acountname != null) { stmt.bindString(2, acountname); } String realname = entity.getRealname(); if (realname != null) { stmt.bindString(3, realname); } String password = entity.getPassword(); if (password != null) { stmt.bindString(4, password); } Byte usertypeid = entity.getUsertypeid(); if (usertypeid != null) { stmt.bindLong(5, usertypeid); } String usertype = entity.getUsertype(); if (usertype != null) { stmt.bindString(6, usertype); } String dguid = entity.getDguid(); if (dguid != null) { stmt.bindString(7, dguid); } String departmentname = entity.getDepartmentname(); if (departmentname != null) { stmt.bindString(8, departmentname); } Boolean isenable = entity.getIsenable(); if (isenable != null) { stmt.bindLong(9, isenable ? 1L: 0L); } String workno = entity.getWorkno(); if (workno != null) { stmt.bindString(10, workno); } String telephone = entity.getTelephone(); if (telephone != null) { stmt.bindString(11, telephone); } String wechatid = entity.getWechatid(); if (wechatid != null) { stmt.bindString(12, wechatid); } String extension1 = entity.getExtension1(); if (extension1 != null) { stmt.bindString(13, extension1); } String extension2 = entity.getExtension2(); if (extension2 != null) { stmt.bindString(14, extension2); } String extension3 = entity.getExtension3(); if (extension3 != null) { stmt.bindString(15, extension3); } String remark = entity.getRemark(); if (remark != null) { stmt.bindString(16, remark); } } @Override protected final void bindValues(SQLiteStatement stmt, Userinfo entity) { stmt.clearBindings(); String guid = entity.getGuid(); if (guid != null) { stmt.bindString(1, guid); } String acountname = entity.getAcountname(); if (acountname != null) { stmt.bindString(2, acountname); } String realname = entity.getRealname(); if (realname != null) { stmt.bindString(3, realname); } String password = entity.getPassword(); if (password != null) { stmt.bindString(4, password); } Byte usertypeid = entity.getUsertypeid(); if (usertypeid != null) { stmt.bindLong(5, usertypeid); } String usertype = entity.getUsertype(); if (usertype != null) { stmt.bindString(6, usertype); } String dguid = entity.getDguid(); if (dguid != null) { stmt.bindString(7, dguid); } String departmentname = entity.getDepartmentname(); if (departmentname != null) { stmt.bindString(8, departmentname); } Boolean isenable = entity.getIsenable(); if (isenable != null) { stmt.bindLong(9, isenable ? 1L: 0L); } String workno = entity.getWorkno(); if (workno != null) { stmt.bindString(10, workno); } String telephone = entity.getTelephone(); if (telephone != null) { stmt.bindString(11, telephone); } String wechatid = entity.getWechatid(); if (wechatid != null) { stmt.bindString(12, wechatid); } String extension1 = entity.getExtension1(); if (extension1 != null) { stmt.bindString(13, extension1); } String extension2 = entity.getExtension2(); if (extension2 != null) { stmt.bindString(14, extension2); } String extension3 = entity.getExtension3(); if (extension3 != null) { stmt.bindString(15, extension3); } String remark = entity.getRemark(); if (remark != null) { stmt.bindString(16, remark); } } @Override public String readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0); } @Override public Userinfo readEntity(Cursor cursor, int offset) { Userinfo entity = new Userinfo( // cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // guid cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // acountname cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // realname cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // password cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4), // usertypeid cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // usertype cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // dguid cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // departmentname cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0, // isenable cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // workno cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // telephone cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // wechatid cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // extension1 cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // extension2 cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // extension3 cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15) // remark ); return entity; } @Override public void readEntity(Cursor cursor, Userinfo entity, int offset) { entity.setGuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0)); entity.setAcountname(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setRealname(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setPassword(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setUsertypeid(cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4)); entity.setUsertype(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setDguid(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); entity.setDepartmentname(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7)); entity.setIsenable(cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0); entity.setWorkno(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setTelephone(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setWechatid(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); entity.setExtension1(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12)); entity.setExtension2(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13)); entity.setExtension3(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14)); entity.setRemark(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15)); } @Override protected final String updateKeyAfterInsert(Userinfo entity, long rowId) { return entity.getGuid(); } @Override public String getKey(Userinfo entity) { if(entity != null) { return entity.getGuid(); } else { return null; } } @Override public boolean hasKey(Userinfo entity) { return entity.getGuid() != null; } @Override protected final boolean isEntityUpdateable() { return true; } }