package com.gzsll.hupu.db;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table THREAD_REPLY.
*/
public class ThreadReplyDao extends AbstractDao<ThreadReply, Void> {
public static final String TABLENAME = "THREAD_REPLY";
/**
* Properties of entity ThreadReply.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Tid = new Property(0, String.class, "tid", false, "TID");
public final static Property Pid = new Property(1, String.class, "pid", false, "PID");
public final static Property Puid = new Property(2, String.class, "puid", false, "PUID");
public final static Property Via = new Property(3, String.class, "via", false, "VIA");
public final static Property Content =
new Property(4, String.class, "content", false, "CONTENT");
public final static Property Create_time =
new Property(5, String.class, "create_time", false, "CREATE_TIME");
public final static Property Update_info =
new Property(6, String.class, "update_info", false, "UPDATE_INFO");
public final static Property Light_count =
new Property(7, Integer.class, "light_count", false, "LIGHT_COUNT");
public final static Property User_banned =
new Property(8, Integer.class, "user_banned", false, "USER_BANNED");
public final static Property Floor =
new Property(9, Integer.class, "floor", false, "FLOOR");
public final static Property Time = new Property(10, String.class, "time", false, "TIME");
public final static Property UserName =
new Property(11, String.class, "userName", false, "USER_NAME");
public final static Property UserImg =
new Property(12, String.class, "userImg", false, "USER_IMG");
public final static Property Smallcontent =
new Property(13, String.class, "smallcontent", false, "SMALLCONTENT");
public final static Property Togglecontent =
new Property(14, String.class, "togglecontent", false, "TOGGLECONTENT");
public final static Property Index =
new Property(15, Integer.class, "index", false, "INDEX");
public final static Property IsLight =
new Property(16, Boolean.class, "isLight", false, "IS_LIGHT");
public final static Property QuoteHeader =
new Property(17, String.class, "quoteHeader", false, "QUOTE_HEADER");
public final static Property QuoteContent =
new Property(18, String.class, "quoteContent", false, "QUOTE_CONTENT");
public final static Property QuoteToggle =
new Property(19, String.class, "quoteToggle", false, "QUOTE_TOGGLE");
public final static Property PageIndex =
new Property(20, Integer.class, "pageIndex", false, "PAGE_INDEX");
}
;
public ThreadReplyDao(DaoConfig config) {
super(config);
}
public ThreadReplyDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
}
/**
* Creates the underlying database table.
*/
public static void createTable(SQLiteDatabase db, boolean ifNotExists) {
String constraint = ifNotExists ? "IF NOT EXISTS " : "";
db.execSQL("CREATE TABLE " + constraint + "'THREAD_REPLY' (" + //
"'TID' TEXT," + // 0: tid
"'PID' TEXT," + // 1: pid
"'PUID' TEXT," + // 2: puid
"'VIA' TEXT," + // 3: via
"'CONTENT' TEXT," + // 4: content
"'CREATE_TIME' TEXT," + // 5: create_time
"'UPDATE_INFO' TEXT," + // 6: update_info
"'LIGHT_COUNT' INTEGER," + // 7: light_count
"'USER_BANNED' INTEGER," + // 8: user_banned
"'FLOOR' INTEGER," + // 9: floor
"'TIME' TEXT," + // 10: time
"'USER_NAME' TEXT," + // 11: userName
"'USER_IMG' TEXT," + // 12: userImg
"'SMALLCONTENT' TEXT," + // 13: smallcontent
"'TOGGLECONTENT' TEXT," + // 14: togglecontent
"'INDEX' INTEGER," + // 15: index
"'IS_LIGHT' INTEGER," + // 16: isLight
"'QUOTE_HEADER' TEXT," + // 17: quoteHeader
"'QUOTE_CONTENT' TEXT," + // 18: quoteContent
"'QUOTE_TOGGLE' TEXT," + // 19: quoteToggle
"'PAGE_INDEX' INTEGER);"); // 20: pageIndex
}
/**
* Drops the underlying database table.
*/
public static void dropTable(SQLiteDatabase db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'THREAD_REPLY'";
db.execSQL(sql);
}
/**
* @inheritdoc
*/
@Override
protected void bindValues(SQLiteStatement stmt, ThreadReply entity) {
stmt.clearBindings();
String tid = entity.getTid();
if (tid != null) {
stmt.bindString(1, tid);
}
String pid = entity.getPid();
if (pid != null) {
stmt.bindString(2, pid);
}
String puid = entity.getPuid();
if (puid != null) {
stmt.bindString(3, puid);
}
String via = entity.getVia();
if (via != null) {
stmt.bindString(4, via);
}
String content = entity.getContent();
if (content != null) {
stmt.bindString(5, content);
}
String create_time = entity.getCreate_time();
if (create_time != null) {
stmt.bindString(6, create_time);
}
String update_info = entity.getUpdate_info();
if (update_info != null) {
stmt.bindString(7, update_info);
}
Integer light_count = entity.getLight_count();
if (light_count != null) {
stmt.bindLong(8, light_count);
}
Integer user_banned = entity.getUser_banned();
if (user_banned != null) {
stmt.bindLong(9, user_banned);
}
Integer floor = entity.getFloor();
if (floor != null) {
stmt.bindLong(10, floor);
}
String time = entity.getTime();
if (time != null) {
stmt.bindString(11, time);
}
String userName = entity.getUserName();
if (userName != null) {
stmt.bindString(12, userName);
}
String userImg = entity.getUserImg();
if (userImg != null) {
stmt.bindString(13, userImg);
}
String smallcontent = entity.getSmallcontent();
if (smallcontent != null) {
stmt.bindString(14, smallcontent);
}
String togglecontent = entity.getTogglecontent();
if (togglecontent != null) {
stmt.bindString(15, togglecontent);
}
Integer index = entity.getIndex();
if (index != null) {
stmt.bindLong(16, index);
}
Boolean isLight = entity.getIsLight();
if (isLight != null) {
stmt.bindLong(17, isLight ? 1l : 0l);
}
String quoteHeader = entity.getQuoteHeader();
if (quoteHeader != null) {
stmt.bindString(18, quoteHeader);
}
String quoteContent = entity.getQuoteContent();
if (quoteContent != null) {
stmt.bindString(19, quoteContent);
}
String quoteToggle = entity.getQuoteToggle();
if (quoteToggle != null) {
stmt.bindString(20, quoteToggle);
}
Integer pageIndex = entity.getPageIndex();
if (pageIndex != null) {
stmt.bindLong(21, pageIndex);
}
}
/**
* @inheritdoc
*/
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
/**
* @inheritdoc
*/
@Override
public ThreadReply readEntity(Cursor cursor, int offset) {
ThreadReply entity = new ThreadReply( //
cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // tid
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pid
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // puid
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // via
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // content
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // create_time
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // update_info
cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7), // light_count
cursor.isNull(offset + 8) ? null : cursor.getInt(offset + 8), // user_banned
cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9), // floor
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // time
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // userName
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // userImg
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // smallcontent
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // togglecontent
cursor.isNull(offset + 15) ? null : cursor.getInt(offset + 15), // index
cursor.isNull(offset + 16) ? null : cursor.getShort(offset + 16) != 0, // isLight
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // quoteHeader
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // quoteContent
cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // quoteToggle
cursor.isNull(offset + 20) ? null : cursor.getInt(offset + 20) // pageIndex
);
return entity;
}
/**
* @inheritdoc
*/
@Override
public void readEntity(Cursor cursor, ThreadReply entity, int offset) {
entity.setTid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
entity.setPid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setPuid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setVia(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
entity.setContent(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setCreate_time(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setUpdate_info(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
entity.setLight_count(cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7));
entity.setUser_banned(cursor.isNull(offset + 8) ? null : cursor.getInt(offset + 8));
entity.setFloor(cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9));
entity.setTime(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setUserName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
entity.setUserImg(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
entity.setSmallcontent(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
entity.setTogglecontent(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
entity.setIndex(cursor.isNull(offset + 15) ? null : cursor.getInt(offset + 15));
entity.setIsLight(cursor.isNull(offset + 16) ? null : cursor.getShort(offset + 16) != 0);
entity.setQuoteHeader(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
entity.setQuoteContent(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
entity.setQuoteToggle(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
entity.setPageIndex(cursor.isNull(offset + 20) ? null : cursor.getInt(offset + 20));
}
/**
* @inheritdoc
*/
@Override
protected Void updateKeyAfterInsert(ThreadReply entity, long rowId) {
// Unsupported or missing PK type
return null;
}
/**
* @inheritdoc
*/
@Override
public Void getKey(ThreadReply entity) {
return null;
}
/**
* @inheritdoc
*/
@Override
protected boolean isEntityUpdateable() {
return true;
}
}