示例#1
0
 /** @inheritdoc */
 @Override
 public Long getKey(Lecture entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
示例#2
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Lecture entity, int offset) {
   entity.setGoods_id(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
   entity.setId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
   entity.setName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setLectureId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setImage(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
   entity.setInfo(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
   entity.setUserId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
 }
示例#3
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, Lecture entity) {
    stmt.clearBindings();

    String goods_id = entity.getGoods_id();
    if (goods_id != null) {
      stmt.bindString(1, goods_id);
    }

    Long id = entity.getId();
    if (id != null) {
      stmt.bindLong(2, id);
    }

    String name = entity.getName();
    if (name != null) {
      stmt.bindString(3, name);
    }

    String lectureId = entity.getLectureId();
    if (lectureId != null) {
      stmt.bindString(4, lectureId);
    }

    String image = entity.getImage();
    if (image != null) {
      stmt.bindString(5, image);
    }

    String info = entity.getInfo();
    if (info != null) {
      stmt.bindString(6, info);
    }

    String userId = entity.getUserId();
    if (userId != null) {
      stmt.bindString(7, userId);
    }
  }
示例#4
0
 /** @inheritdoc */
 @Override
 protected Long updateKeyAfterInsert(Lecture entity, long rowId) {
   entity.setId(rowId);
   return rowId;
 }
示例#5
0
 @Override
 protected void attachEntity(Lecture entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }