Exemplo n.º 1
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, FavoItem entity) {
    stmt.clearBindings();

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

    ReaderItemType type = entity.getType();
    if (type != null) {
      stmt.bindString(2, typeConverter.convertToDatabaseValue(type));
    }

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

    Timestamp addDate = entity.getAddDate();
    if (addDate != null) {
      stmt.bindLong(4, addDateConverter.convertToDatabaseValue(addDate));
    }

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

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

    String excerpt = entity.getExcerpt();
    if (excerpt != null) {
      stmt.bindString(7, excerpt);
    }

    String thumbC = entity.getThumbC();
    if (thumbC != null) {
      stmt.bindString(8, thumbC);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    String videoThumbnail = entity.getVideoThumbnail();
    if (videoThumbnail != null) {
      stmt.bindString(24, videoThumbnail);
    }

    String videoTitle = entity.getVideoTitle();
    if (videoTitle != null) {
      stmt.bindString(25, videoTitle);
    }

    String videoDescription = entity.getVideoDescription();
    if (videoDescription != null) {
      stmt.bindString(26, videoDescription);
    }

    Float videoDuration = entity.getVideoDuration();
    if (videoDuration != null) {
      stmt.bindDouble(27, videoDuration);
    }

    String videoLink = entity.getVideoLink();
    if (videoLink != null) {
      stmt.bindString(28, videoLink);
    }

    String videoPlayer = entity.getVideoPlayer();
    if (videoPlayer != null) {
      stmt.bindString(29, videoPlayer);
    }

    String videoSource = entity.getVideoSource();
    if (videoSource != null) {
      stmt.bindString(30, videoSource);
    }
  }