Get chapter list

This commit is contained in:
inorichi
2015-10-06 19:44:30 +02:00
parent a78359e4a9
commit a3463addc3
6 changed files with 109 additions and 114 deletions

View File

@@ -17,7 +17,7 @@ public class Chapter {
@NonNull
@StorIOSQLiteColumn(name = ChaptersTable.COLUMN_MANGA_ID)
public int manga_id;
public Long manga_id;
@NonNull
@StorIOSQLiteColumn(name = ChaptersTable.COLUMN_URL)
@@ -35,6 +35,10 @@ public class Chapter {
@StorIOSQLiteColumn(name = ChaptersTable.COLUMN_DATE_FETCH)
public long date_fetch;
@NonNull
@StorIOSQLiteColumn(name = ChaptersTable.COLUMN_DATE_UPLOAD)
public long date_upload;
public Chapter() {}
@@ -45,23 +49,17 @@ public class Chapter {
Chapter chapter = (Chapter) o;
if (manga_id != chapter.manga_id) return false;
if (read != chapter.read) return false;
if (date_fetch != chapter.date_fetch) return false;
if (id != null ? !id.equals(chapter.id) : chapter.id != null) return false;
if (!url.equals(chapter.url)) return false;
return name.equals(chapter.name);
return url.equals(chapter.url);
}
@Override
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + manga_id;
result = 31 * result + url.hashCode();
result = 31 * result + name.hashCode();
result = 31 * result + read;
result = 31 * result + (int) (date_fetch ^ (date_fetch >>> 32));
return result;
return url.hashCode();
}
public static Chapter newChapter() {
Chapter c = new Chapter();
return c;
}
}

View File

@@ -79,10 +79,9 @@ public class Manga {
this.title = title;
}
public Manga(long id, String title, String author, String artist, String url,
public Manga(String title, String author, String artist, String url,
String description, String genre, String status, int rank,
String thumbnail_url) {
this.id = id;
this.title = title;
this.author = author;
this.artist = artist;
@@ -94,10 +93,10 @@ public class Manga {
this.thumbnail_url = thumbnail_url;
}
public static Manga newManga(long id, String title, String author, String artist, String url,
public static Manga newManga(String title, String author, String artist, String url,
String description, String genre, String status, int rank,
String thumbnail_url) {
return new Manga(id, title, author, artist, url, description, genre, status, rank, thumbnail_url);
return new Manga(title, author, artist, url, description, genre, status, rank, thumbnail_url);
}
@Override