111 lines
2.4 KiB
Java
111 lines
2.4 KiB
Java
package com.novelbook.android.db;
|
|
|
|
|
|
import org.litepal.LitePal;
|
|
import org.litepal.crud.LitePalSupport;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.List;
|
|
|
|
|
|
public class Chapter extends LitePalSupport implements Serializable {
|
|
private int id;
|
|
private int novelId;//本地小说id
|
|
private String novelPath; //离线导入小说文件地址
|
|
private String chapterName;
|
|
private long novelChapterStartPos;
|
|
private String chapterUrl;
|
|
private int length;
|
|
private String chapterPath; //缓存地址
|
|
private String domain; //目标 site
|
|
private int index;//第几章
|
|
|
|
public int getIndex() {
|
|
return index;
|
|
}
|
|
|
|
public void setIndex(int index) {
|
|
this.index = index;
|
|
}
|
|
|
|
public String getDomain() {
|
|
return domain;
|
|
}
|
|
|
|
public void setDomain(String domain) {
|
|
this.domain = domain;
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(int id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public int getNovelId() {
|
|
return novelId;
|
|
}
|
|
|
|
public void setNovelId(int novelId) {
|
|
this.novelId = novelId;
|
|
}
|
|
|
|
public String getNovelPath() {
|
|
return novelPath;
|
|
}
|
|
|
|
public void setNovelPath(String novelPath) {
|
|
this.novelPath = novelPath;
|
|
}
|
|
|
|
public String getChapterName() {
|
|
return chapterName;
|
|
}
|
|
|
|
public void setChapterName(String chapterName) {
|
|
this.chapterName = chapterName;
|
|
}
|
|
|
|
public long getNovelChapterStartPos() {
|
|
return novelChapterStartPos;
|
|
}
|
|
|
|
public void setNovelChapterStartPos(long novelChapterStartPos) {
|
|
this.novelChapterStartPos = novelChapterStartPos;
|
|
}
|
|
|
|
public String getChapterUrl() {
|
|
return chapterUrl;
|
|
}
|
|
|
|
public void setChapterUrl(String chapterUrl) {
|
|
this.chapterUrl = chapterUrl;
|
|
}
|
|
|
|
public int getLength() {
|
|
return length;
|
|
}
|
|
|
|
public void setLength(int length) {
|
|
this.length = length;
|
|
}
|
|
|
|
public String getChapterPath() {
|
|
return chapterPath;
|
|
}
|
|
|
|
public void setChapterPath(String chapterPath) {
|
|
this.chapterPath = chapterPath;
|
|
}
|
|
|
|
public static List<Chapter> getUnCachedChapters(int noveId,String domain ){
|
|
// return LitePal.where("novelId = ? and domain = ? and chapterPath = ?" ,noveId+"",domain,"null") .find(Chapter.class);
|
|
return LitePal.where("novelId = ? and domain = ? " ,noveId+"",domain).find(Chapter.class);
|
|
|
|
}
|
|
|
|
}
|
|
|