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.Mediafile;
|
|
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
/**
|
* DAO for table "MEDIAFILE".
|
*/
|
public class MediafileDao extends AbstractDao<Mediafile, String> {
|
|
public static final String TABLENAME = "MEDIAFILE";
|
|
/**
|
* Properties of entity Mediafile.<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 Iguid = new Property(1, String.class, "iguid", false, "IGUID");
|
public final static Property Businessguid = new Property(2, String.class, "businessguid", false, "BUSINESSGUID");
|
public final static Property Longitude = new Property(3, Double.class, "longitude", false, "LONGITUDE");
|
public final static Property Latitude = new Property(4, Double.class, "latitude", false, "LATITUDE");
|
public final static Property Address = new Property(5, String.class, "address", false, "ADDRESS");
|
public final static Property Filetype = new Property(6, Integer.class, "filetype", false, "FILETYPE");
|
public final static Property Businesstypeid = new Property(7, Byte.class, "businesstypeid", false, "BUSINESSTYPEID");
|
public final static Property Businesstype = new Property(8, String.class, "businesstype", false, "BUSINESSTYPE");
|
public final static Property Path = new Property(9, String.class, "path", false, "PATH");
|
public final static Property Description = new Property(10, String.class, "description", false, "DESCRIPTION");
|
public final static Property Savetime = new Property(11, java.util.Date.class, "savetime", false, "SAVETIME");
|
public final static Property Ischanged = new Property(12, Boolean.class, "ischanged", false, "ISCHANGED");
|
public final static Property Extension1 = new Property(13, String.class, "extension1", false, "EXTENSION1");
|
public final static Property Extension2 = new Property(14, String.class, "extension2", false, "EXTENSION2");
|
public final static Property Extension3 = new Property(15, String.class, "extension3", false, "EXTENSION3");
|
public final static Property Remark = new Property(16, String.class, "remark", false, "REMARK");
|
}
|
|
|
public MediafileDao(DaoConfig config) {
|
super(config);
|
}
|
|
public MediafileDao(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 + "\"MEDIAFILE\" (" + //
|
"\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid
|
"\"IGUID\" TEXT," + // 1: iguid
|
"\"BUSINESSGUID\" TEXT," + // 2: businessguid
|
"\"LONGITUDE\" REAL," + // 3: longitude
|
"\"LATITUDE\" REAL," + // 4: latitude
|
"\"ADDRESS\" TEXT," + // 5: address
|
"\"FILETYPE\" INTEGER," + // 6: filetype
|
"\"BUSINESSTYPEID\" INTEGER," + // 7: businesstypeid
|
"\"BUSINESSTYPE\" TEXT," + // 8: businesstype
|
"\"PATH\" TEXT," + // 9: path
|
"\"DESCRIPTION\" TEXT," + // 10: description
|
"\"SAVETIME\" INTEGER," + // 11: savetime
|
"\"ISCHANGED\" INTEGER," + // 12: ischanged
|
"\"EXTENSION1\" TEXT," + // 13: extension1
|
"\"EXTENSION2\" TEXT," + // 14: extension2
|
"\"EXTENSION3\" TEXT," + // 15: extension3
|
"\"REMARK\" TEXT);"); // 16: remark
|
}
|
|
/** Drops the underlying database table. */
|
public static void dropTable(Database db, boolean ifExists) {
|
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MEDIAFILE\"";
|
db.execSQL(sql);
|
}
|
|
@Override
|
protected final void bindValues(DatabaseStatement stmt, Mediafile entity) {
|
stmt.clearBindings();
|
|
String guid = entity.getGuid();
|
if (guid != null) {
|
stmt.bindString(1, guid);
|
}
|
|
String iguid = entity.getIguid();
|
if (iguid != null) {
|
stmt.bindString(2, iguid);
|
}
|
|
String businessguid = entity.getBusinessguid();
|
if (businessguid != null) {
|
stmt.bindString(3, businessguid);
|
}
|
|
Double longitude = entity.getLongitude();
|
if (longitude != null) {
|
stmt.bindDouble(4, longitude);
|
}
|
|
Double latitude = entity.getLatitude();
|
if (latitude != null) {
|
stmt.bindDouble(5, latitude);
|
}
|
|
String address = entity.getAddress();
|
if (address != null) {
|
stmt.bindString(6, address);
|
}
|
|
Integer filetype = entity.getFiletype();
|
if (filetype != null) {
|
stmt.bindLong(7, filetype);
|
}
|
|
Byte businesstypeid = entity.getBusinesstypeid();
|
if (businesstypeid != null) {
|
stmt.bindLong(8, businesstypeid);
|
}
|
|
String businesstype = entity.getBusinesstype();
|
if (businesstype != null) {
|
stmt.bindString(9, businesstype);
|
}
|
|
String path = entity.getPath();
|
if (path != null) {
|
stmt.bindString(10, path);
|
}
|
|
String description = entity.getDescription();
|
if (description != null) {
|
stmt.bindString(11, description);
|
}
|
|
java.util.Date savetime = entity.getSavetime();
|
if (savetime != null) {
|
stmt.bindLong(12, savetime.getTime());
|
}
|
|
Boolean ischanged = entity.getIschanged();
|
if (ischanged != null) {
|
stmt.bindLong(13, ischanged ? 1L: 0L);
|
}
|
|
String extension1 = entity.getExtension1();
|
if (extension1 != null) {
|
stmt.bindString(14, extension1);
|
}
|
|
String extension2 = entity.getExtension2();
|
if (extension2 != null) {
|
stmt.bindString(15, extension2);
|
}
|
|
String extension3 = entity.getExtension3();
|
if (extension3 != null) {
|
stmt.bindString(16, extension3);
|
}
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(17, remark);
|
}
|
}
|
|
@Override
|
protected final void bindValues(SQLiteStatement stmt, Mediafile entity) {
|
stmt.clearBindings();
|
|
String guid = entity.getGuid();
|
if (guid != null) {
|
stmt.bindString(1, guid);
|
}
|
|
String iguid = entity.getIguid();
|
if (iguid != null) {
|
stmt.bindString(2, iguid);
|
}
|
|
String businessguid = entity.getBusinessguid();
|
if (businessguid != null) {
|
stmt.bindString(3, businessguid);
|
}
|
|
Double longitude = entity.getLongitude();
|
if (longitude != null) {
|
stmt.bindDouble(4, longitude);
|
}
|
|
Double latitude = entity.getLatitude();
|
if (latitude != null) {
|
stmt.bindDouble(5, latitude);
|
}
|
|
String address = entity.getAddress();
|
if (address != null) {
|
stmt.bindString(6, address);
|
}
|
|
Integer filetype = entity.getFiletype();
|
if (filetype != null) {
|
stmt.bindLong(7, filetype);
|
}
|
|
Byte businesstypeid = entity.getBusinesstypeid();
|
if (businesstypeid != null) {
|
stmt.bindLong(8, businesstypeid);
|
}
|
|
String businesstype = entity.getBusinesstype();
|
if (businesstype != null) {
|
stmt.bindString(9, businesstype);
|
}
|
|
String path = entity.getPath();
|
if (path != null) {
|
stmt.bindString(10, path);
|
}
|
|
String description = entity.getDescription();
|
if (description != null) {
|
stmt.bindString(11, description);
|
}
|
|
java.util.Date savetime = entity.getSavetime();
|
if (savetime != null) {
|
stmt.bindLong(12, savetime.getTime());
|
}
|
|
Boolean ischanged = entity.getIschanged();
|
if (ischanged != null) {
|
stmt.bindLong(13, ischanged ? 1L: 0L);
|
}
|
|
String extension1 = entity.getExtension1();
|
if (extension1 != null) {
|
stmt.bindString(14, extension1);
|
}
|
|
String extension2 = entity.getExtension2();
|
if (extension2 != null) {
|
stmt.bindString(15, extension2);
|
}
|
|
String extension3 = entity.getExtension3();
|
if (extension3 != null) {
|
stmt.bindString(16, extension3);
|
}
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(17, remark);
|
}
|
}
|
|
@Override
|
public String readKey(Cursor cursor, int offset) {
|
return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
|
}
|
|
@Override
|
public Mediafile readEntity(Cursor cursor, int offset) {
|
Mediafile entity = new Mediafile( //
|
cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // guid
|
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // iguid
|
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // businessguid
|
cursor.isNull(offset + 3) ? null : cursor.getDouble(offset + 3), // longitude
|
cursor.isNull(offset + 4) ? null : cursor.getDouble(offset + 4), // latitude
|
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // address
|
cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // filetype
|
cursor.isNull(offset + 7) ? null : (byte) cursor.getShort(offset + 7), // businesstypeid
|
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // businesstype
|
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // path
|
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // description
|
cursor.isNull(offset + 11) ? null : new java.util.Date(cursor.getLong(offset + 11)), // savetime
|
cursor.isNull(offset + 12) ? null : cursor.getShort(offset + 12) != 0, // ischanged
|
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // extension1
|
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // extension2
|
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // extension3
|
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16) // remark
|
);
|
return entity;
|
}
|
|
@Override
|
public void readEntity(Cursor cursor, Mediafile entity, int offset) {
|
entity.setGuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
|
entity.setIguid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
|
entity.setBusinessguid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
|
entity.setLongitude(cursor.isNull(offset + 3) ? null : cursor.getDouble(offset + 3));
|
entity.setLatitude(cursor.isNull(offset + 4) ? null : cursor.getDouble(offset + 4));
|
entity.setAddress(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
entity.setFiletype(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
|
entity.setBusinesstypeid(cursor.isNull(offset + 7) ? null : (byte) cursor.getShort(offset + 7));
|
entity.setBusinesstype(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
|
entity.setPath(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
entity.setDescription(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
entity.setSavetime(cursor.isNull(offset + 11) ? null : new java.util.Date(cursor.getLong(offset + 11)));
|
entity.setIschanged(cursor.isNull(offset + 12) ? null : cursor.getShort(offset + 12) != 0);
|
entity.setExtension1(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
|
entity.setExtension2(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
|
entity.setExtension3(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
|
entity.setRemark(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
|
}
|
|
@Override
|
protected final String updateKeyAfterInsert(Mediafile entity, long rowId) {
|
return entity.getGuid();
|
}
|
|
@Override
|
public String getKey(Mediafile entity) {
|
if(entity != null) {
|
return entity.getGuid();
|
} else {
|
return null;
|
}
|
}
|
|
@Override
|
public boolean hasKey(Mediafile entity) {
|
return entity.getGuid() != null;
|
}
|
|
@Override
|
protected final boolean isEntityUpdateable() {
|
return true;
|
}
|
|
}
|