Example #1
0
 /** @inheritdoc */
 @Override
 public Long getKey(DBGroupThread entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
Example #2
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, DBGroupThread entity) {
    stmt.clearBindings();

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

    Integer lights = entity.getLights();
    if (lights != null) {
      stmt.bindLong(2, lights);
    }

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

    Long createAtUnixTime = entity.getCreateAtUnixTime();
    if (createAtUnixTime != null) {
      stmt.bindLong(4, createAtUnixTime);
    }

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

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

    Integer replies = entity.getReplies();
    if (replies != null) {
      stmt.bindLong(7, replies);
    }

    Integer tid = entity.getTid();
    if (tid != null) {
      stmt.bindLong(8, tid);
    }

    Long serverId = entity.getServerId();
    if (serverId != null) {
      stmt.bindLong(9, serverId);
    }

    Long userId = entity.getUserId();
    if (userId != null) {
      stmt.bindLong(10, userId);
    }

    Long coverId = entity.getCoverId();
    if (coverId != null) {
      stmt.bindLong(11, coverId);
    }

    Long groupId = entity.getGroupId();
    if (groupId != null) {
      stmt.bindLong(12, groupId);
    }
  }