예제 #1
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, PicItem entity) {
    stmt.clearBindings();

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

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

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

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

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

    Timestamp date = entity.getDate();
    if (date != null) {
      stmt.bindLong(6, dateConverter.convertToDatabaseValue(date));
    }

    Long votePositive = entity.getVotePositive();
    if (votePositive != null) {
      stmt.bindLong(7, votePositive);
    }

    Long voteNegative = entity.getVoteNegative();
    if (voteNegative != null) {
      stmt.bindLong(8, voteNegative);
    }

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

    String threadId = entity.getThreadId();
    if (threadId != null) {
      stmt.bindString(10, threadId);
    }

    String content = entity.getContent();
    if (content != null) {
      stmt.bindString(11, content);
    }

    String textContent = entity.getTextContent();
    if (textContent != null) {
      stmt.bindString(12, textContent);
    }

    String pics = entity.getPics();
    if (pics != null) {
      stmt.bindString(13, pics);
    }

    String picFirst = entity.getPicFirst();
    if (picFirst != null) {
      stmt.bindString(14, picFirst);
    }

    Long picCount = entity.getPicCount();
    if (picCount != null) {
      stmt.bindLong(15, picCount);
    }

    Boolean hasGif = entity.getHasGif();
    if (hasGif != null) {
      stmt.bindLong(16, hasGif ? 1L : 0L);
    }
  }