package com.pinapelz.query; import java.util.ArrayList; import java.util.List; /** * Builder for a video search query * Default values set in constructor */ public class VideoSearchQueryBuilder { private String sort; private List lang; private List target; private List conditions; private List topic; private List vch; private List org; private List comment; private boolean paginated; private int offset; private int limit; public VideoSearchQueryBuilder() { this.sort = "newest"; this.paginated = true; this.offset = 0; this.limit = 10; this.topic = new ArrayList(); this.comment = new ArrayList(); this.org = List.of("Nijisanji"); this.vch = new ArrayList(); this.conditions = new ArrayList(); this.lang = List.of("en"); } public String getSort() { return sort; } public VideoSearchQueryBuilder setSort(String sort) { this.sort = sort; return this; } public List getLang() { return lang; } public VideoSearchQueryBuilder setLang(List lang) { this.lang = lang; return this; } public List getTarget() { return target; } public VideoSearchQueryBuilder setTarget(List target) { this.target = target; return this; } public List getConditions() { return conditions; } public VideoSearchQueryBuilder setConditions(List conditions) { this.conditions = conditions; return this; } public List getTopic() { return topic; } public VideoSearchQueryBuilder setTopic(List topic) { this.topic = topic; return this; } public List getVch() { return vch; } public VideoSearchQueryBuilder setVch(List vch) { this.vch = vch; return this; } public List getOrg() { return org; } public VideoSearchQueryBuilder setOrg(List org) { this.org = org; return this; } public List getComment() { return comment; } public VideoSearchQueryBuilder setComment(List comment) { this.comment = comment; return this; } public boolean isPaginated() { return paginated; } public VideoSearchQueryBuilder setPaginated(boolean paginated) { this.paginated = paginated; return this; } public int getOffset() { return offset; } public VideoSearchQueryBuilder setOffset(int offset) { this.offset = offset; return this; } public int getLimit() { return limit; } public VideoSearchQueryBuilder setLimit(int limit) { this.limit = limit; return this; } }