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.ChangeEffect;
|
|
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
/**
|
* DAO for table "CHANGE_EFFECT".
|
*/
|
public class ChangeEffectDao extends AbstractDao<ChangeEffect, String> {
|
|
public static final String TABLENAME = "CHANGE_EFFECT";
|
|
/**
|
* Properties of entity ChangeEffect.<br/>
|
* Can be used for QueryBuilder and for referencing column names.
|
*/
|
public static class Properties {
|
public final static Property EfGuid = new Property(0, String.class, "efGuid", true, "EF_GUID");
|
public final static Property EfName = new Property(1, String.class, "efName", false, "EF_NAME");
|
public final static Property EfProblemtypeguid = new Property(2, String.class, "efProblemtypeguid", false, "EF_PROBLEMTYPEGUID");
|
public final static Property EfProblemtypename = new Property(3, String.class, "efProblemtypename", false, "EF_PROBLEMTYPENAME");
|
public final static Property EfUserguid = new Property(4, String.class, "efUserguid", false, "EF_USERGUID");
|
public final static Property EfUsername = new Property(5, String.class, "efUsername", false, "EF_USERNAME");
|
public final static Property EfRealname = new Property(6, String.class, "efRealname", false, "EF_REALNAME");
|
public final static Property EfCreatedate = new Property(7, java.util.Date.class, "efCreatedate", false, "EF_CREATEDATE");
|
public final static Property EfUpdatedate = new Property(8, java.util.Date.class, "efUpdatedate", false, "EF_UPDATEDATE");
|
public final static Property EfExtension1 = new Property(9, String.class, "efExtension1", false, "EF_EXTENSION1");
|
public final static Property EfExtension2 = new Property(10, String.class, "efExtension2", false, "EF_EXTENSION2");
|
public final static Property EfExtension3 = new Property(11, String.class, "efExtension3", false, "EF_EXTENSION3");
|
public final static Property EfRemark = new Property(12, String.class, "efRemark", false, "EF_REMARK");
|
}
|
|
|
public ChangeEffectDao(DaoConfig config) {
|
super(config);
|
}
|
|
public ChangeEffectDao(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 + "\"CHANGE_EFFECT\" (" + //
|
"\"EF_GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: efGuid
|
"\"EF_NAME\" TEXT," + // 1: efName
|
"\"EF_PROBLEMTYPEGUID\" TEXT," + // 2: efProblemtypeguid
|
"\"EF_PROBLEMTYPENAME\" TEXT," + // 3: efProblemtypename
|
"\"EF_USERGUID\" TEXT," + // 4: efUserguid
|
"\"EF_USERNAME\" TEXT," + // 5: efUsername
|
"\"EF_REALNAME\" TEXT," + // 6: efRealname
|
"\"EF_CREATEDATE\" INTEGER," + // 7: efCreatedate
|
"\"EF_UPDATEDATE\" INTEGER," + // 8: efUpdatedate
|
"\"EF_EXTENSION1\" TEXT," + // 9: efExtension1
|
"\"EF_EXTENSION2\" TEXT," + // 10: efExtension2
|
"\"EF_EXTENSION3\" TEXT," + // 11: efExtension3
|
"\"EF_REMARK\" TEXT);"); // 12: efRemark
|
}
|
|
/** Drops the underlying database table. */
|
public static void dropTable(Database db, boolean ifExists) {
|
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CHANGE_EFFECT\"";
|
db.execSQL(sql);
|
}
|
|
@Override
|
protected final void bindValues(DatabaseStatement stmt, ChangeEffect entity) {
|
stmt.clearBindings();
|
|
String efGuid = entity.getEfGuid();
|
if (efGuid != null) {
|
stmt.bindString(1, efGuid);
|
}
|
|
String efName = entity.getEfName();
|
if (efName != null) {
|
stmt.bindString(2, efName);
|
}
|
|
String efProblemtypeguid = entity.getEfProblemtypeguid();
|
if (efProblemtypeguid != null) {
|
stmt.bindString(3, efProblemtypeguid);
|
}
|
|
String efProblemtypename = entity.getEfProblemtypename();
|
if (efProblemtypename != null) {
|
stmt.bindString(4, efProblemtypename);
|
}
|
|
String efUserguid = entity.getEfUserguid();
|
if (efUserguid != null) {
|
stmt.bindString(5, efUserguid);
|
}
|
|
String efUsername = entity.getEfUsername();
|
if (efUsername != null) {
|
stmt.bindString(6, efUsername);
|
}
|
|
String efRealname = entity.getEfRealname();
|
if (efRealname != null) {
|
stmt.bindString(7, efRealname);
|
}
|
|
java.util.Date efCreatedate = entity.getEfCreatedate();
|
if (efCreatedate != null) {
|
stmt.bindLong(8, efCreatedate.getTime());
|
}
|
|
java.util.Date efUpdatedate = entity.getEfUpdatedate();
|
if (efUpdatedate != null) {
|
stmt.bindLong(9, efUpdatedate.getTime());
|
}
|
|
String efExtension1 = entity.getEfExtension1();
|
if (efExtension1 != null) {
|
stmt.bindString(10, efExtension1);
|
}
|
|
String efExtension2 = entity.getEfExtension2();
|
if (efExtension2 != null) {
|
stmt.bindString(11, efExtension2);
|
}
|
|
String efExtension3 = entity.getEfExtension3();
|
if (efExtension3 != null) {
|
stmt.bindString(12, efExtension3);
|
}
|
|
String efRemark = entity.getEfRemark();
|
if (efRemark != null) {
|
stmt.bindString(13, efRemark);
|
}
|
}
|
|
@Override
|
protected final void bindValues(SQLiteStatement stmt, ChangeEffect entity) {
|
stmt.clearBindings();
|
|
String efGuid = entity.getEfGuid();
|
if (efGuid != null) {
|
stmt.bindString(1, efGuid);
|
}
|
|
String efName = entity.getEfName();
|
if (efName != null) {
|
stmt.bindString(2, efName);
|
}
|
|
String efProblemtypeguid = entity.getEfProblemtypeguid();
|
if (efProblemtypeguid != null) {
|
stmt.bindString(3, efProblemtypeguid);
|
}
|
|
String efProblemtypename = entity.getEfProblemtypename();
|
if (efProblemtypename != null) {
|
stmt.bindString(4, efProblemtypename);
|
}
|
|
String efUserguid = entity.getEfUserguid();
|
if (efUserguid != null) {
|
stmt.bindString(5, efUserguid);
|
}
|
|
String efUsername = entity.getEfUsername();
|
if (efUsername != null) {
|
stmt.bindString(6, efUsername);
|
}
|
|
String efRealname = entity.getEfRealname();
|
if (efRealname != null) {
|
stmt.bindString(7, efRealname);
|
}
|
|
java.util.Date efCreatedate = entity.getEfCreatedate();
|
if (efCreatedate != null) {
|
stmt.bindLong(8, efCreatedate.getTime());
|
}
|
|
java.util.Date efUpdatedate = entity.getEfUpdatedate();
|
if (efUpdatedate != null) {
|
stmt.bindLong(9, efUpdatedate.getTime());
|
}
|
|
String efExtension1 = entity.getEfExtension1();
|
if (efExtension1 != null) {
|
stmt.bindString(10, efExtension1);
|
}
|
|
String efExtension2 = entity.getEfExtension2();
|
if (efExtension2 != null) {
|
stmt.bindString(11, efExtension2);
|
}
|
|
String efExtension3 = entity.getEfExtension3();
|
if (efExtension3 != null) {
|
stmt.bindString(12, efExtension3);
|
}
|
|
String efRemark = entity.getEfRemark();
|
if (efRemark != null) {
|
stmt.bindString(13, efRemark);
|
}
|
}
|
|
@Override
|
public String readKey(Cursor cursor, int offset) {
|
return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
|
}
|
|
@Override
|
public ChangeEffect readEntity(Cursor cursor, int offset) {
|
ChangeEffect entity = new ChangeEffect( //
|
cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // efGuid
|
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // efName
|
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // efProblemtypeguid
|
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // efProblemtypename
|
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // efUserguid
|
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // efUsername
|
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // efRealname
|
cursor.isNull(offset + 7) ? null : new java.util.Date(cursor.getLong(offset + 7)), // efCreatedate
|
cursor.isNull(offset + 8) ? null : new java.util.Date(cursor.getLong(offset + 8)), // efUpdatedate
|
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // efExtension1
|
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // efExtension2
|
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // efExtension3
|
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12) // efRemark
|
);
|
return entity;
|
}
|
|
@Override
|
public void readEntity(Cursor cursor, ChangeEffect entity, int offset) {
|
entity.setEfGuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
|
entity.setEfName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
|
entity.setEfProblemtypeguid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
|
entity.setEfProblemtypename(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
|
entity.setEfUserguid(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
|
entity.setEfUsername(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
entity.setEfRealname(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
|
entity.setEfCreatedate(cursor.isNull(offset + 7) ? null : new java.util.Date(cursor.getLong(offset + 7)));
|
entity.setEfUpdatedate(cursor.isNull(offset + 8) ? null : new java.util.Date(cursor.getLong(offset + 8)));
|
entity.setEfExtension1(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
entity.setEfExtension2(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
entity.setEfExtension3(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
|
entity.setEfRemark(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
|
}
|
|
@Override
|
protected final String updateKeyAfterInsert(ChangeEffect entity, long rowId) {
|
return entity.getEfGuid();
|
}
|
|
@Override
|
public String getKey(ChangeEffect entity) {
|
if(entity != null) {
|
return entity.getEfGuid();
|
} else {
|
return null;
|
}
|
}
|
|
@Override
|
public boolean hasKey(ChangeEffect entity) {
|
return entity.getEfGuid() != null;
|
}
|
|
@Override
|
protected final boolean isEntityUpdateable() {
|
return true;
|
}
|
|
}
|