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.entity.Domainitem;
|
|
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
/**
|
* DAO for table "DOMAINITEM".
|
*/
|
public class DomainitemDao extends AbstractDao<Domainitem, String> {
|
|
public static final String TABLENAME = "DOMAINITEM";
|
|
/**
|
* Properties of entity Domainitem.<br/>
|
* 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 Dcguid = new Property(1, String.class, "dcguid", false, "DCGUID");
|
public final static Property Catelogname = new Property(2, String.class, "catelogname", false, "CATELOGNAME");
|
public final static Property Value = new Property(3, String.class, "value", false, "VALUE");
|
public final static Property Text = new Property(4, String.class, "text", false, "TEXT");
|
public final static Property Index = new Property(5, Integer.class, "index", false, "INDEX");
|
public final static Property Parentguid = new Property(6, String.class, "parentguid", false, "PARENTGUID");
|
public final static Property Isenable = new Property(7, Boolean.class, "isenable", false, "ISENABLE");
|
public final static Property Code = new Property(8, String.class, "code", false, "CODE");
|
public final static Property Remark = new Property(9, String.class, "remark", false, "REMARK");
|
}
|
|
|
public DomainitemDao(DaoConfig config) {
|
super(config);
|
}
|
|
public DomainitemDao(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 + "\"DOMAINITEM\" (" + //
|
"\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid
|
"\"DCGUID\" TEXT," + // 1: dcguid
|
"\"CATELOGNAME\" TEXT," + // 2: catelogname
|
"\"VALUE\" TEXT," + // 3: value
|
"\"TEXT\" TEXT," + // 4: text
|
"\"INDEX\" INTEGER," + // 5: index
|
"\"PARENTGUID\" TEXT," + // 6: parentguid
|
"\"ISENABLE\" INTEGER," + // 7: isenable
|
"\"CODE\" TEXT," + // 8: code
|
"\"REMARK\" TEXT);"); // 9: remark
|
}
|
|
/** Drops the underlying database table. */
|
public static void dropTable(Database db, boolean ifExists) {
|
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DOMAINITEM\"";
|
db.execSQL(sql);
|
}
|
|
@Override
|
protected final void bindValues(DatabaseStatement stmt, Domainitem entity) {
|
stmt.clearBindings();
|
|
String guid = entity.getGuid();
|
if (guid != null) {
|
stmt.bindString(1, guid);
|
}
|
|
String dcguid = entity.getDcguid();
|
if (dcguid != null) {
|
stmt.bindString(2, dcguid);
|
}
|
|
String catelogname = entity.getCatelogname();
|
if (catelogname != null) {
|
stmt.bindString(3, catelogname);
|
}
|
|
String value = entity.getValue();
|
if (value != null) {
|
stmt.bindString(4, value);
|
}
|
|
String text = entity.getText();
|
if (text != null) {
|
stmt.bindString(5, text);
|
}
|
|
Integer index = entity.getIndex();
|
if (index != null) {
|
stmt.bindLong(6, index);
|
}
|
|
String parentguid = entity.getParentguid();
|
if (parentguid != null) {
|
stmt.bindString(7, parentguid);
|
}
|
|
Boolean isenable = entity.getIsenable();
|
if (isenable != null) {
|
stmt.bindLong(8, isenable ? 1L: 0L);
|
}
|
|
String code = entity.getCode();
|
if (code != null) {
|
stmt.bindString(9, code);
|
}
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(10, remark);
|
}
|
}
|
|
@Override
|
protected final void bindValues(SQLiteStatement stmt, Domainitem entity) {
|
stmt.clearBindings();
|
|
String guid = entity.getGuid();
|
if (guid != null) {
|
stmt.bindString(1, guid);
|
}
|
|
String dcguid = entity.getDcguid();
|
if (dcguid != null) {
|
stmt.bindString(2, dcguid);
|
}
|
|
String catelogname = entity.getCatelogname();
|
if (catelogname != null) {
|
stmt.bindString(3, catelogname);
|
}
|
|
String value = entity.getValue();
|
if (value != null) {
|
stmt.bindString(4, value);
|
}
|
|
String text = entity.getText();
|
if (text != null) {
|
stmt.bindString(5, text);
|
}
|
|
Integer index = entity.getIndex();
|
if (index != null) {
|
stmt.bindLong(6, index);
|
}
|
|
String parentguid = entity.getParentguid();
|
if (parentguid != null) {
|
stmt.bindString(7, parentguid);
|
}
|
|
Boolean isenable = entity.getIsenable();
|
if (isenable != null) {
|
stmt.bindLong(8, isenable ? 1L: 0L);
|
}
|
|
String code = entity.getCode();
|
if (code != null) {
|
stmt.bindString(9, code);
|
}
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(10, remark);
|
}
|
}
|
|
@Override
|
public String readKey(Cursor cursor, int offset) {
|
return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
|
}
|
|
@Override
|
public Domainitem readEntity(Cursor cursor, int offset) {
|
Domainitem entity = new Domainitem( //
|
cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // guid
|
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // dcguid
|
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // catelogname
|
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // value
|
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // text
|
cursor.isNull(offset + 5) ? null : cursor.getInt(offset + 5), // index
|
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // parentguid
|
cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0, // isenable
|
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // code
|
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // remark
|
);
|
return entity;
|
}
|
|
@Override
|
public void readEntity(Cursor cursor, Domainitem entity, int offset) {
|
entity.setGuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
|
entity.setDcguid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
|
entity.setCatelogname(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
|
entity.setValue(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
|
entity.setText(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
|
entity.setIndex(cursor.isNull(offset + 5) ? null : cursor.getInt(offset + 5));
|
entity.setParentguid(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
|
entity.setIsenable(cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0);
|
entity.setCode(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
|
entity.setRemark(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
}
|
|
@Override
|
protected final String updateKeyAfterInsert(Domainitem entity, long rowId) {
|
return entity.getGuid();
|
}
|
|
@Override
|
public String getKey(Domainitem entity) {
|
if(entity != null) {
|
return entity.getGuid();
|
} else {
|
return null;
|
}
|
}
|
|
@Override
|
public boolean hasKey(Domainitem entity) {
|
return entity.getGuid() != null;
|
}
|
|
@Override
|
protected final boolean isEntityUpdateable() {
|
return true;
|
}
|
|
}
|