From 4156ec8a28e5a4cdb215c15ccd9e3bea26939e47 Mon Sep 17 00:00:00 2001 From: Dmitriy Bogdanov Date: Wed, 22 May 2024 23:53:17 +0200 Subject: [PATCH 1/2] Remove non-foss greendao plugin Add generated DAO classes, remove the generator plugin. --- app/build.gradle | 6 - .../apps/Poche/data/dao/AnnotationDao.java | 243 +++++++++++ .../Poche/data/dao/AnnotationRangeDao.java | 190 +++++++++ .../Poche/data/dao/ArticleContentDao.java | 129 ++++++ .../apps/Poche/data/dao/ArticleDao.java | 396 ++++++++++++++++++ .../Poche/data/dao/ArticleTagsJoinDao.java | 148 +++++++ .../apps/Poche/data/dao/DaoMaster.java | 114 +++++ .../apps/Poche/data/dao/DaoSession.java | 132 ++++++ .../apps/Poche/data/dao/QueueItemDao.java | 203 +++++++++ .../gaulupeau/apps/Poche/data/dao/TagDao.java | 164 ++++++++ build.gradle | 1 - 11 files changed, 1719 insertions(+), 7 deletions(-) create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java create mode 100644 app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java diff --git a/app/build.gradle b/app/build.gradle index 36afff6bd..5368e30ae 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.application' -apply plugin: 'org.greenrobot.greendao' android { compileSdk 34 @@ -58,11 +57,6 @@ android { } } -greendao { - schemaVersion 108 - daoPackage 'fr.gaulupeau.apps.Poche.data.dao' -} - dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.media:media:1.7.0' diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java new file mode 100644 index 000000000..f7ffb426d --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java @@ -0,0 +1,243 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import java.util.List; +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; +import org.greenrobot.greendao.query.Query; +import org.greenrobot.greendao.query.QueryBuilder; + +import fr.gaulupeau.apps.Poche.data.dao.entities.Annotation; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "ANNOTATION". +*/ +public class AnnotationDao extends AbstractDao { + + public static final String TABLENAME = "ANNOTATION"; + + /** + * Properties of entity Annotation.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property AnnotationId = new Property(1, Integer.class, "annotationId", false, "ANNOTATION_ID"); + public final static Property ArticleId = new Property(2, Long.class, "articleId", false, "ARTICLE_ID"); + public final static Property Text = new Property(3, String.class, "text", false, "TEXT"); + public final static Property Quote = new Property(4, String.class, "quote", false, "QUOTE"); + public final static Property CreatedAt = new Property(5, java.util.Date.class, "createdAt", false, "CREATED_AT"); + public final static Property UpdatedAt = new Property(6, java.util.Date.class, "updatedAt", false, "UPDATED_AT"); + public final static Property AnnotatorSchemaVersion = new Property(7, String.class, "annotatorSchemaVersion", false, "ANNOTATOR_SCHEMA_VERSION"); + } + + private DaoSession daoSession; + + private Query article_AnnotationsQuery; + + public AnnotationDao(DaoConfig config) { + super(config); + } + + public AnnotationDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + this.daoSession = daoSession; + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"ANNOTATION\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"ANNOTATION_ID\" INTEGER UNIQUE ," + // 1: annotationId + "\"ARTICLE_ID\" INTEGER," + // 2: articleId + "\"TEXT\" TEXT," + // 3: text + "\"QUOTE\" TEXT," + // 4: quote + "\"CREATED_AT\" INTEGER," + // 5: createdAt + "\"UPDATED_AT\" INTEGER," + // 6: updatedAt + "\"ANNOTATOR_SCHEMA_VERSION\" TEXT);"); // 7: annotatorSchemaVersion + // Add Indexes + db.execSQL("CREATE INDEX " + constraint + "IDX_ANNOTATION_ARTICLE_ID ON \"ANNOTATION\"" + + " (\"ARTICLE_ID\" ASC);"); + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ANNOTATION\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, Annotation entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Integer annotationId = entity.getAnnotationId(); + if (annotationId != null) { + stmt.bindLong(2, annotationId); + } + + Long articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(3, articleId); + } + + String text = entity.getText(); + if (text != null) { + stmt.bindString(4, text); + } + + String quote = entity.getQuote(); + if (quote != null) { + stmt.bindString(5, quote); + } + + java.util.Date createdAt = entity.getCreatedAt(); + if (createdAt != null) { + stmt.bindLong(6, createdAt.getTime()); + } + + java.util.Date updatedAt = entity.getUpdatedAt(); + if (updatedAt != null) { + stmt.bindLong(7, updatedAt.getTime()); + } + + String annotatorSchemaVersion = entity.getAnnotatorSchemaVersion(); + if (annotatorSchemaVersion != null) { + stmt.bindString(8, annotatorSchemaVersion); + } + } + + @Override + protected final void bindValues(SQLiteStatement stmt, Annotation entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Integer annotationId = entity.getAnnotationId(); + if (annotationId != null) { + stmt.bindLong(2, annotationId); + } + + Long articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(3, articleId); + } + + String text = entity.getText(); + if (text != null) { + stmt.bindString(4, text); + } + + String quote = entity.getQuote(); + if (quote != null) { + stmt.bindString(5, quote); + } + + java.util.Date createdAt = entity.getCreatedAt(); + if (createdAt != null) { + stmt.bindLong(6, createdAt.getTime()); + } + + java.util.Date updatedAt = entity.getUpdatedAt(); + if (updatedAt != null) { + stmt.bindLong(7, updatedAt.getTime()); + } + + String annotatorSchemaVersion = entity.getAnnotatorSchemaVersion(); + if (annotatorSchemaVersion != null) { + stmt.bindString(8, annotatorSchemaVersion); + } + } + + @Override + protected final void attachEntity(Annotation entity) { + super.attachEntity(entity); + entity.__setDaoSession(daoSession); + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public Annotation readEntity(Cursor cursor, int offset) { + Annotation entity = new Annotation( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1), // annotationId + cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2), // articleId + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // text + cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // quote + cursor.isNull(offset + 5) ? null : new java.util.Date(cursor.getLong(offset + 5)), // createdAt + cursor.isNull(offset + 6) ? null : new java.util.Date(cursor.getLong(offset + 6)), // updatedAt + cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // annotatorSchemaVersion + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, Annotation entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setAnnotationId(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1)); + entity.setArticleId(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2)); + entity.setText(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); + entity.setQuote(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); + entity.setCreatedAt(cursor.isNull(offset + 5) ? null : new java.util.Date(cursor.getLong(offset + 5))); + entity.setUpdatedAt(cursor.isNull(offset + 6) ? null : new java.util.Date(cursor.getLong(offset + 6))); + entity.setAnnotatorSchemaVersion(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7)); + } + + @Override + protected final Long updateKeyAfterInsert(Annotation entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(Annotation entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(Annotation entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + + /** Internal query to resolve the "annotations" to-many relationship of Article. */ + public List _queryArticle_Annotations(Long articleId) { + synchronized (this) { + if (article_AnnotationsQuery == null) { + QueryBuilder queryBuilder = queryBuilder(); + queryBuilder.where(Properties.ArticleId.eq(null)); + article_AnnotationsQuery = queryBuilder.build(); + } + } + Query query = article_AnnotationsQuery.forCurrentThread(); + query.setParameter(0, articleId); + return query.list(); + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java new file mode 100644 index 000000000..348c5f82f --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java @@ -0,0 +1,190 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import java.util.List; +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; +import org.greenrobot.greendao.query.Query; +import org.greenrobot.greendao.query.QueryBuilder; + +import fr.gaulupeau.apps.Poche.data.dao.entities.AnnotationRange; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "ANNOTATION_RANGE". +*/ +public class AnnotationRangeDao extends AbstractDao { + + public static final String TABLENAME = "ANNOTATION_RANGE"; + + /** + * Properties of entity AnnotationRange.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property AnnotationId = new Property(1, Long.class, "annotationId", false, "ANNOTATION_ID"); + public final static Property Start = new Property(2, String.class, "start", false, "START"); + public final static Property End = new Property(3, String.class, "end", false, "END"); + public final static Property StartOffset = new Property(4, long.class, "startOffset", false, "START_OFFSET"); + public final static Property EndOffset = new Property(5, long.class, "endOffset", false, "END_OFFSET"); + } + + private Query annotation_RangesQuery; + + public AnnotationRangeDao(DaoConfig config) { + super(config); + } + + public AnnotationRangeDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"ANNOTATION_RANGE\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"ANNOTATION_ID\" INTEGER," + // 1: annotationId + "\"START\" TEXT," + // 2: start + "\"END\" TEXT," + // 3: end + "\"START_OFFSET\" INTEGER NOT NULL ," + // 4: startOffset + "\"END_OFFSET\" INTEGER NOT NULL );"); // 5: endOffset + // Add Indexes + db.execSQL("CREATE INDEX " + constraint + "IDX_ANNOTATION_RANGE_ANNOTATION_ID ON \"ANNOTATION_RANGE\"" + + " (\"ANNOTATION_ID\" ASC);"); + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ANNOTATION_RANGE\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, AnnotationRange entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Long annotationId = entity.getAnnotationId(); + if (annotationId != null) { + stmt.bindLong(2, annotationId); + } + + String start = entity.getStart(); + if (start != null) { + stmt.bindString(3, start); + } + + String end = entity.getEnd(); + if (end != null) { + stmt.bindString(4, end); + } + stmt.bindLong(5, entity.getStartOffset()); + stmt.bindLong(6, entity.getEndOffset()); + } + + @Override + protected final void bindValues(SQLiteStatement stmt, AnnotationRange entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Long annotationId = entity.getAnnotationId(); + if (annotationId != null) { + stmt.bindLong(2, annotationId); + } + + String start = entity.getStart(); + if (start != null) { + stmt.bindString(3, start); + } + + String end = entity.getEnd(); + if (end != null) { + stmt.bindString(4, end); + } + stmt.bindLong(5, entity.getStartOffset()); + stmt.bindLong(6, entity.getEndOffset()); + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public AnnotationRange readEntity(Cursor cursor, int offset) { + AnnotationRange entity = new AnnotationRange( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // annotationId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // start + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // end + cursor.getLong(offset + 4), // startOffset + cursor.getLong(offset + 5) // endOffset + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, AnnotationRange entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setAnnotationId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1)); + entity.setStart(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); + entity.setEnd(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); + entity.setStartOffset(cursor.getLong(offset + 4)); + entity.setEndOffset(cursor.getLong(offset + 5)); + } + + @Override + protected final Long updateKeyAfterInsert(AnnotationRange entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(AnnotationRange entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(AnnotationRange entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + + /** Internal query to resolve the "ranges" to-many relationship of Annotation. */ + public List _queryAnnotation_Ranges(Long annotationId) { + synchronized (this) { + if (annotation_RangesQuery == null) { + QueryBuilder queryBuilder = queryBuilder(); + queryBuilder.where(Properties.AnnotationId.eq(null)); + annotation_RangesQuery = queryBuilder.build(); + } + } + Query query = annotation_RangesQuery.forCurrentThread(); + query.setParameter(0, annotationId); + return query.list(); + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java new file mode 100644 index 000000000..a1df629fc --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java @@ -0,0 +1,129 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; + +import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleContent; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "ARTICLE_CONTENT". +*/ +public class ArticleContentDao extends AbstractDao { + + public static final String TABLENAME = "ARTICLE_CONTENT"; + + /** + * Properties of entity ArticleContent.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property Content = new Property(1, String.class, "content", false, "CONTENT"); + } + + + public ArticleContentDao(DaoConfig config) { + super(config); + } + + public ArticleContentDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"ARTICLE_CONTENT\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"CONTENT\" TEXT);"); // 1: content + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ARTICLE_CONTENT\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, ArticleContent entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + String content = entity.getContent(); + if (content != null) { + stmt.bindString(2, content); + } + } + + @Override + protected final void bindValues(SQLiteStatement stmt, ArticleContent entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + String content = entity.getContent(); + if (content != null) { + stmt.bindString(2, content); + } + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public ArticleContent readEntity(Cursor cursor, int offset) { + ArticleContent entity = new ArticleContent( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1) // content + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, ArticleContent entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setContent(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); + } + + @Override + protected final Long updateKeyAfterInsert(ArticleContent entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(ArticleContent entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(ArticleContent entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java new file mode 100644 index 000000000..b4e3acf8d --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java @@ -0,0 +1,396 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; + +import fr.gaulupeau.apps.Poche.data.dao.entities.Article; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "ARTICLE". +*/ +public class ArticleDao extends AbstractDao { + + public static final String TABLENAME = "ARTICLE"; + + /** + * Properties of entity Article.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property ArticleId = new Property(1, Integer.class, "articleId", false, "ARTICLE_ID"); + public final static Property Title = new Property(2, String.class, "title", false, "TITLE"); + public final static Property Domain = new Property(3, String.class, "domain", false, "DOMAIN"); + public final static Property Url = new Property(4, String.class, "url", false, "URL"); + public final static Property GivenUrl = new Property(5, String.class, "givenUrl", false, "GIVEN_URL"); + public final static Property OriginUrl = new Property(6, String.class, "originUrl", false, "ORIGIN_URL"); + public final static Property EstimatedReadingTime = new Property(7, int.class, "estimatedReadingTime", false, "ESTIMATED_READING_TIME"); + public final static Property Language = new Property(8, String.class, "language", false, "LANGUAGE"); + public final static Property PreviewPictureURL = new Property(9, String.class, "previewPictureURL", false, "PREVIEW_PICTURE_URL"); + public final static Property Authors = new Property(10, String.class, "authors", false, "AUTHORS"); + public final static Property Favorite = new Property(11, Boolean.class, "favorite", false, "FAVORITE"); + public final static Property Archive = new Property(12, Boolean.class, "archive", false, "ARCHIVE"); + public final static Property CreationDate = new Property(13, java.util.Date.class, "creationDate", false, "CREATION_DATE"); + public final static Property UpdateDate = new Property(14, java.util.Date.class, "updateDate", false, "UPDATE_DATE"); + public final static Property PublishedAt = new Property(15, java.util.Date.class, "publishedAt", false, "PUBLISHED_AT"); + public final static Property StarredAt = new Property(16, java.util.Date.class, "starredAt", false, "STARRED_AT"); + public final static Property IsPublic = new Property(17, Boolean.class, "isPublic", false, "IS_PUBLIC"); + public final static Property PublicUid = new Property(18, String.class, "publicUid", false, "PUBLIC_UID"); + public final static Property ArticleProgress = new Property(19, Double.class, "articleProgress", false, "ARTICLE_PROGRESS"); + public final static Property ImagesDownloaded = new Property(20, Boolean.class, "imagesDownloaded", false, "IMAGES_DOWNLOADED"); + } + + private DaoSession daoSession; + + + public ArticleDao(DaoConfig config) { + super(config); + } + + public ArticleDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + this.daoSession = daoSession; + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"ARTICLE\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"ARTICLE_ID\" INTEGER UNIQUE ," + // 1: articleId + "\"TITLE\" TEXT," + // 2: title + "\"DOMAIN\" TEXT," + // 3: domain + "\"URL\" TEXT," + // 4: url + "\"GIVEN_URL\" TEXT," + // 5: givenUrl + "\"ORIGIN_URL\" TEXT," + // 6: originUrl + "\"ESTIMATED_READING_TIME\" INTEGER NOT NULL ," + // 7: estimatedReadingTime + "\"LANGUAGE\" TEXT," + // 8: language + "\"PREVIEW_PICTURE_URL\" TEXT," + // 9: previewPictureURL + "\"AUTHORS\" TEXT," + // 10: authors + "\"FAVORITE\" INTEGER," + // 11: favorite + "\"ARCHIVE\" INTEGER," + // 12: archive + "\"CREATION_DATE\" INTEGER," + // 13: creationDate + "\"UPDATE_DATE\" INTEGER," + // 14: updateDate + "\"PUBLISHED_AT\" INTEGER," + // 15: publishedAt + "\"STARRED_AT\" INTEGER," + // 16: starredAt + "\"IS_PUBLIC\" INTEGER," + // 17: isPublic + "\"PUBLIC_UID\" TEXT," + // 18: publicUid + "\"ARTICLE_PROGRESS\" REAL," + // 19: articleProgress + "\"IMAGES_DOWNLOADED\" INTEGER);"); // 20: imagesDownloaded + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ARTICLE\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, Article entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Integer articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(2, articleId); + } + + String title = entity.getTitle(); + if (title != null) { + stmt.bindString(3, title); + } + + String domain = entity.getDomain(); + if (domain != null) { + stmt.bindString(4, domain); + } + + String url = entity.getUrl(); + if (url != null) { + stmt.bindString(5, url); + } + + String givenUrl = entity.getGivenUrl(); + if (givenUrl != null) { + stmt.bindString(6, givenUrl); + } + + String originUrl = entity.getOriginUrl(); + if (originUrl != null) { + stmt.bindString(7, originUrl); + } + stmt.bindLong(8, entity.getEstimatedReadingTime()); + + String language = entity.getLanguage(); + if (language != null) { + stmt.bindString(9, language); + } + + String previewPictureURL = entity.getPreviewPictureURL(); + if (previewPictureURL != null) { + stmt.bindString(10, previewPictureURL); + } + + String authors = entity.getAuthors(); + if (authors != null) { + stmt.bindString(11, authors); + } + + Boolean favorite = entity.getFavorite(); + if (favorite != null) { + stmt.bindLong(12, favorite ? 1L: 0L); + } + + Boolean archive = entity.getArchive(); + if (archive != null) { + stmt.bindLong(13, archive ? 1L: 0L); + } + + java.util.Date creationDate = entity.getCreationDate(); + if (creationDate != null) { + stmt.bindLong(14, creationDate.getTime()); + } + + java.util.Date updateDate = entity.getUpdateDate(); + if (updateDate != null) { + stmt.bindLong(15, updateDate.getTime()); + } + + java.util.Date publishedAt = entity.getPublishedAt(); + if (publishedAt != null) { + stmt.bindLong(16, publishedAt.getTime()); + } + + java.util.Date starredAt = entity.getStarredAt(); + if (starredAt != null) { + stmt.bindLong(17, starredAt.getTime()); + } + + Boolean isPublic = entity.getIsPublic(); + if (isPublic != null) { + stmt.bindLong(18, isPublic ? 1L: 0L); + } + + String publicUid = entity.getPublicUid(); + if (publicUid != null) { + stmt.bindString(19, publicUid); + } + + Double articleProgress = entity.getArticleProgress(); + if (articleProgress != null) { + stmt.bindDouble(20, articleProgress); + } + + Boolean imagesDownloaded = entity.getImagesDownloaded(); + if (imagesDownloaded != null) { + stmt.bindLong(21, imagesDownloaded ? 1L: 0L); + } + } + + @Override + protected final void bindValues(SQLiteStatement stmt, Article entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Integer articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(2, articleId); + } + + String title = entity.getTitle(); + if (title != null) { + stmt.bindString(3, title); + } + + String domain = entity.getDomain(); + if (domain != null) { + stmt.bindString(4, domain); + } + + String url = entity.getUrl(); + if (url != null) { + stmt.bindString(5, url); + } + + String givenUrl = entity.getGivenUrl(); + if (givenUrl != null) { + stmt.bindString(6, givenUrl); + } + + String originUrl = entity.getOriginUrl(); + if (originUrl != null) { + stmt.bindString(7, originUrl); + } + stmt.bindLong(8, entity.getEstimatedReadingTime()); + + String language = entity.getLanguage(); + if (language != null) { + stmt.bindString(9, language); + } + + String previewPictureURL = entity.getPreviewPictureURL(); + if (previewPictureURL != null) { + stmt.bindString(10, previewPictureURL); + } + + String authors = entity.getAuthors(); + if (authors != null) { + stmt.bindString(11, authors); + } + + Boolean favorite = entity.getFavorite(); + if (favorite != null) { + stmt.bindLong(12, favorite ? 1L: 0L); + } + + Boolean archive = entity.getArchive(); + if (archive != null) { + stmt.bindLong(13, archive ? 1L: 0L); + } + + java.util.Date creationDate = entity.getCreationDate(); + if (creationDate != null) { + stmt.bindLong(14, creationDate.getTime()); + } + + java.util.Date updateDate = entity.getUpdateDate(); + if (updateDate != null) { + stmt.bindLong(15, updateDate.getTime()); + } + + java.util.Date publishedAt = entity.getPublishedAt(); + if (publishedAt != null) { + stmt.bindLong(16, publishedAt.getTime()); + } + + java.util.Date starredAt = entity.getStarredAt(); + if (starredAt != null) { + stmt.bindLong(17, starredAt.getTime()); + } + + Boolean isPublic = entity.getIsPublic(); + if (isPublic != null) { + stmt.bindLong(18, isPublic ? 1L: 0L); + } + + String publicUid = entity.getPublicUid(); + if (publicUid != null) { + stmt.bindString(19, publicUid); + } + + Double articleProgress = entity.getArticleProgress(); + if (articleProgress != null) { + stmt.bindDouble(20, articleProgress); + } + + Boolean imagesDownloaded = entity.getImagesDownloaded(); + if (imagesDownloaded != null) { + stmt.bindLong(21, imagesDownloaded ? 1L: 0L); + } + } + + @Override + protected final void attachEntity(Article entity) { + super.attachEntity(entity); + entity.__setDaoSession(daoSession); + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public Article readEntity(Cursor cursor, int offset) { + Article entity = new Article( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1), // articleId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // title + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // domain + cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // url + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // givenUrl + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // originUrl + cursor.getInt(offset + 7), // estimatedReadingTime + cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // language + cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // previewPictureURL + cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // authors + cursor.isNull(offset + 11) ? null : cursor.getShort(offset + 11) != 0, // favorite + cursor.isNull(offset + 12) ? null : cursor.getShort(offset + 12) != 0, // archive + cursor.isNull(offset + 13) ? null : new java.util.Date(cursor.getLong(offset + 13)), // creationDate + cursor.isNull(offset + 14) ? null : new java.util.Date(cursor.getLong(offset + 14)), // updateDate + cursor.isNull(offset + 15) ? null : new java.util.Date(cursor.getLong(offset + 15)), // publishedAt + cursor.isNull(offset + 16) ? null : new java.util.Date(cursor.getLong(offset + 16)), // starredAt + cursor.isNull(offset + 17) ? null : cursor.getShort(offset + 17) != 0, // isPublic + cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // publicUid + cursor.isNull(offset + 19) ? null : cursor.getDouble(offset + 19), // articleProgress + cursor.isNull(offset + 20) ? null : cursor.getShort(offset + 20) != 0 // imagesDownloaded + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, Article entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setArticleId(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1)); + entity.setTitle(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); + entity.setDomain(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); + entity.setUrl(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); + entity.setGivenUrl(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); + entity.setOriginUrl(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); + entity.setEstimatedReadingTime(cursor.getInt(offset + 7)); + entity.setLanguage(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); + entity.setPreviewPictureURL(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); + entity.setAuthors(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); + entity.setFavorite(cursor.isNull(offset + 11) ? null : cursor.getShort(offset + 11) != 0); + entity.setArchive(cursor.isNull(offset + 12) ? null : cursor.getShort(offset + 12) != 0); + entity.setCreationDate(cursor.isNull(offset + 13) ? null : new java.util.Date(cursor.getLong(offset + 13))); + entity.setUpdateDate(cursor.isNull(offset + 14) ? null : new java.util.Date(cursor.getLong(offset + 14))); + entity.setPublishedAt(cursor.isNull(offset + 15) ? null : new java.util.Date(cursor.getLong(offset + 15))); + entity.setStarredAt(cursor.isNull(offset + 16) ? null : new java.util.Date(cursor.getLong(offset + 16))); + entity.setIsPublic(cursor.isNull(offset + 17) ? null : cursor.getShort(offset + 17) != 0); + entity.setPublicUid(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18)); + entity.setArticleProgress(cursor.isNull(offset + 19) ? null : cursor.getDouble(offset + 19)); + entity.setImagesDownloaded(cursor.isNull(offset + 20) ? null : cursor.getShort(offset + 20) != 0); + } + + @Override + protected final Long updateKeyAfterInsert(Article entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(Article entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(Article entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java new file mode 100644 index 000000000..438cf5974 --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java @@ -0,0 +1,148 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; + +import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleTagsJoin; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "ARTICLE_TAGS_JOIN". +*/ +public class ArticleTagsJoinDao extends AbstractDao { + + public static final String TABLENAME = "ARTICLE_TAGS_JOIN"; + + /** + * Properties of entity ArticleTagsJoin.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property ArticleId = new Property(1, Long.class, "articleId", false, "ARTICLE_ID"); + public final static Property TagId = new Property(2, Long.class, "tagId", false, "TAG_ID"); + } + + + public ArticleTagsJoinDao(DaoConfig config) { + super(config); + } + + public ArticleTagsJoinDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"ARTICLE_TAGS_JOIN\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"ARTICLE_ID\" INTEGER," + // 1: articleId + "\"TAG_ID\" INTEGER);"); // 2: tagId + // Add Indexes + db.execSQL("CREATE INDEX " + constraint + "IDX_ARTICLE_TAGS_JOIN_ARTICLE_ID ON \"ARTICLE_TAGS_JOIN\"" + + " (\"ARTICLE_ID\" ASC);"); + db.execSQL("CREATE INDEX " + constraint + "IDX_ARTICLE_TAGS_JOIN_TAG_ID ON \"ARTICLE_TAGS_JOIN\"" + + " (\"TAG_ID\" ASC);"); + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ARTICLE_TAGS_JOIN\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, ArticleTagsJoin entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Long articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(2, articleId); + } + + Long tagId = entity.getTagId(); + if (tagId != null) { + stmt.bindLong(3, tagId); + } + } + + @Override + protected final void bindValues(SQLiteStatement stmt, ArticleTagsJoin entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Long articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(2, articleId); + } + + Long tagId = entity.getTagId(); + if (tagId != null) { + stmt.bindLong(3, tagId); + } + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public ArticleTagsJoin readEntity(Cursor cursor, int offset) { + ArticleTagsJoin entity = new ArticleTagsJoin( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // articleId + cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2) // tagId + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, ArticleTagsJoin entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setArticleId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1)); + entity.setTagId(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2)); + } + + @Override + protected final Long updateKeyAfterInsert(ArticleTagsJoin entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(ArticleTagsJoin entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(ArticleTagsJoin entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java new file mode 100644 index 000000000..19f4ca529 --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java @@ -0,0 +1,114 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteDatabase.CursorFactory; +import android.util.Log; + +import org.greenrobot.greendao.AbstractDaoMaster; +import org.greenrobot.greendao.database.StandardDatabase; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseOpenHelper; +import org.greenrobot.greendao.identityscope.IdentityScopeType; + + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * Master of DAO (schema version 108): knows all DAOs. + */ +public class DaoMaster extends AbstractDaoMaster { + public static final int SCHEMA_VERSION = 108; + + /** Creates underlying database table using DAOs. */ + public static void createAllTables(Database db, boolean ifNotExists) { + AnnotationDao.createTable(db, ifNotExists); + AnnotationRangeDao.createTable(db, ifNotExists); + ArticleDao.createTable(db, ifNotExists); + ArticleContentDao.createTable(db, ifNotExists); + ArticleTagsJoinDao.createTable(db, ifNotExists); + QueueItemDao.createTable(db, ifNotExists); + TagDao.createTable(db, ifNotExists); + } + + /** Drops underlying database table using DAOs. */ + public static void dropAllTables(Database db, boolean ifExists) { + AnnotationDao.dropTable(db, ifExists); + AnnotationRangeDao.dropTable(db, ifExists); + ArticleDao.dropTable(db, ifExists); + ArticleContentDao.dropTable(db, ifExists); + ArticleTagsJoinDao.dropTable(db, ifExists); + QueueItemDao.dropTable(db, ifExists); + TagDao.dropTable(db, ifExists); + } + + /** + * WARNING: Drops all table on Upgrade! Use only during development. + * Convenience method using a {@link DevOpenHelper}. + */ + public static DaoSession newDevSession(Context context, String name) { + Database db = new DevOpenHelper(context, name).getWritableDb(); + DaoMaster daoMaster = new DaoMaster(db); + return daoMaster.newSession(); + } + + public DaoMaster(SQLiteDatabase db) { + this(new StandardDatabase(db)); + } + + public DaoMaster(Database db) { + super(db, SCHEMA_VERSION); + registerDaoClass(AnnotationDao.class); + registerDaoClass(AnnotationRangeDao.class); + registerDaoClass(ArticleDao.class); + registerDaoClass(ArticleContentDao.class); + registerDaoClass(ArticleTagsJoinDao.class); + registerDaoClass(QueueItemDao.class); + registerDaoClass(TagDao.class); + } + + public DaoSession newSession() { + return new DaoSession(db, IdentityScopeType.Session, daoConfigMap); + } + + public DaoSession newSession(IdentityScopeType type) { + return new DaoSession(db, type, daoConfigMap); + } + + /** + * Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} - + */ + public static abstract class OpenHelper extends DatabaseOpenHelper { + public OpenHelper(Context context, String name) { + super(context, name, SCHEMA_VERSION); + } + + public OpenHelper(Context context, String name, CursorFactory factory) { + super(context, name, factory, SCHEMA_VERSION); + } + + @Override + public void onCreate(Database db) { + Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION); + createAllTables(db, false); + } + } + + /** WARNING: Drops all table on Upgrade! Use only during development. */ + public static class DevOpenHelper extends OpenHelper { + public DevOpenHelper(Context context, String name) { + super(context, name); + } + + public DevOpenHelper(Context context, String name, CursorFactory factory) { + super(context, name, factory); + } + + @Override + public void onUpgrade(Database db, int oldVersion, int newVersion) { + Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables"); + dropAllTables(db, true); + onCreate(db); + } + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java new file mode 100644 index 000000000..c33051c00 --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java @@ -0,0 +1,132 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import java.util.Map; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.AbstractDaoSession; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.identityscope.IdentityScopeType; +import org.greenrobot.greendao.internal.DaoConfig; + +import fr.gaulupeau.apps.Poche.data.dao.entities.Annotation; +import fr.gaulupeau.apps.Poche.data.dao.entities.AnnotationRange; +import fr.gaulupeau.apps.Poche.data.dao.entities.Article; +import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleContent; +import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleTagsJoin; +import fr.gaulupeau.apps.Poche.data.dao.entities.QueueItem; +import fr.gaulupeau.apps.Poche.data.dao.entities.Tag; + +import fr.gaulupeau.apps.Poche.data.dao.AnnotationDao; +import fr.gaulupeau.apps.Poche.data.dao.AnnotationRangeDao; +import fr.gaulupeau.apps.Poche.data.dao.ArticleDao; +import fr.gaulupeau.apps.Poche.data.dao.ArticleContentDao; +import fr.gaulupeau.apps.Poche.data.dao.ArticleTagsJoinDao; +import fr.gaulupeau.apps.Poche.data.dao.QueueItemDao; +import fr.gaulupeau.apps.Poche.data.dao.TagDao; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. + +/** + * {@inheritDoc} + * + * @see org.greenrobot.greendao.AbstractDaoSession + */ +public class DaoSession extends AbstractDaoSession { + + private final DaoConfig annotationDaoConfig; + private final DaoConfig annotationRangeDaoConfig; + private final DaoConfig articleDaoConfig; + private final DaoConfig articleContentDaoConfig; + private final DaoConfig articleTagsJoinDaoConfig; + private final DaoConfig queueItemDaoConfig; + private final DaoConfig tagDaoConfig; + + private final AnnotationDao annotationDao; + private final AnnotationRangeDao annotationRangeDao; + private final ArticleDao articleDao; + private final ArticleContentDao articleContentDao; + private final ArticleTagsJoinDao articleTagsJoinDao; + private final QueueItemDao queueItemDao; + private final TagDao tagDao; + + public DaoSession(Database db, IdentityScopeType type, Map>, DaoConfig> + daoConfigMap) { + super(db); + + annotationDaoConfig = daoConfigMap.get(AnnotationDao.class).clone(); + annotationDaoConfig.initIdentityScope(type); + + annotationRangeDaoConfig = daoConfigMap.get(AnnotationRangeDao.class).clone(); + annotationRangeDaoConfig.initIdentityScope(type); + + articleDaoConfig = daoConfigMap.get(ArticleDao.class).clone(); + articleDaoConfig.initIdentityScope(type); + + articleContentDaoConfig = daoConfigMap.get(ArticleContentDao.class).clone(); + articleContentDaoConfig.initIdentityScope(type); + + articleTagsJoinDaoConfig = daoConfigMap.get(ArticleTagsJoinDao.class).clone(); + articleTagsJoinDaoConfig.initIdentityScope(type); + + queueItemDaoConfig = daoConfigMap.get(QueueItemDao.class).clone(); + queueItemDaoConfig.initIdentityScope(type); + + tagDaoConfig = daoConfigMap.get(TagDao.class).clone(); + tagDaoConfig.initIdentityScope(type); + + annotationDao = new AnnotationDao(annotationDaoConfig, this); + annotationRangeDao = new AnnotationRangeDao(annotationRangeDaoConfig, this); + articleDao = new ArticleDao(articleDaoConfig, this); + articleContentDao = new ArticleContentDao(articleContentDaoConfig, this); + articleTagsJoinDao = new ArticleTagsJoinDao(articleTagsJoinDaoConfig, this); + queueItemDao = new QueueItemDao(queueItemDaoConfig, this); + tagDao = new TagDao(tagDaoConfig, this); + + registerDao(Annotation.class, annotationDao); + registerDao(AnnotationRange.class, annotationRangeDao); + registerDao(Article.class, articleDao); + registerDao(ArticleContent.class, articleContentDao); + registerDao(ArticleTagsJoin.class, articleTagsJoinDao); + registerDao(QueueItem.class, queueItemDao); + registerDao(Tag.class, tagDao); + } + + public void clear() { + annotationDaoConfig.clearIdentityScope(); + annotationRangeDaoConfig.clearIdentityScope(); + articleDaoConfig.clearIdentityScope(); + articleContentDaoConfig.clearIdentityScope(); + articleTagsJoinDaoConfig.clearIdentityScope(); + queueItemDaoConfig.clearIdentityScope(); + tagDaoConfig.clearIdentityScope(); + } + + public AnnotationDao getAnnotationDao() { + return annotationDao; + } + + public AnnotationRangeDao getAnnotationRangeDao() { + return annotationRangeDao; + } + + public ArticleDao getArticleDao() { + return articleDao; + } + + public ArticleContentDao getArticleContentDao() { + return articleContentDao; + } + + public ArticleTagsJoinDao getArticleTagsJoinDao() { + return articleTagsJoinDao; + } + + public QueueItemDao getQueueItemDao() { + return queueItemDao; + } + + public TagDao getTagDao() { + return tagDao; + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java new file mode 100644 index 000000000..a6e844725 --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java @@ -0,0 +1,203 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; + +import fr.gaulupeau.apps.Poche.data.dao.entities.QueueItem.Action; +import fr.gaulupeau.apps.Poche.data.dao.entities.QueueItem.ActionConverter; + +import fr.gaulupeau.apps.Poche.data.dao.entities.QueueItem; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "QUEUE_ITEM". +*/ +public class QueueItemDao extends AbstractDao { + + public static final String TABLENAME = "QUEUE_ITEM"; + + /** + * Properties of entity QueueItem.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property QueueNumber = new Property(1, Long.class, "queueNumber", false, "QUEUE_NUMBER"); + public final static Property Action = new Property(2, Integer.class, "action", false, "ACTION"); + public final static Property ArticleId = new Property(3, Integer.class, "articleId", false, "ARTICLE_ID"); + public final static Property LocalArticleId = new Property(4, Long.class, "localArticleId", false, "LOCAL_ARTICLE_ID"); + public final static Property Extra = new Property(5, String.class, "extra", false, "EXTRA"); + public final static Property Extra2 = new Property(6, String.class, "extra2", false, "EXTRA2"); + } + + private final ActionConverter actionConverter = new ActionConverter(); + + public QueueItemDao(DaoConfig config) { + super(config); + } + + public QueueItemDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"QUEUE_ITEM\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"QUEUE_NUMBER\" INTEGER," + // 1: queueNumber + "\"ACTION\" INTEGER," + // 2: action + "\"ARTICLE_ID\" INTEGER," + // 3: articleId + "\"LOCAL_ARTICLE_ID\" INTEGER," + // 4: localArticleId + "\"EXTRA\" TEXT," + // 5: extra + "\"EXTRA2\" TEXT);"); // 6: extra2 + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"QUEUE_ITEM\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, QueueItem entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Long queueNumber = entity.getQueueNumber(); + if (queueNumber != null) { + stmt.bindLong(2, queueNumber); + } + + Action action = entity.getAction(); + if (action != null) { + stmt.bindLong(3, actionConverter.convertToDatabaseValue(action)); + } + + Integer articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(4, articleId); + } + + Long localArticleId = entity.getLocalArticleId(); + if (localArticleId != null) { + stmt.bindLong(5, localArticleId); + } + + String extra = entity.getExtra(); + if (extra != null) { + stmt.bindString(6, extra); + } + + String extra2 = entity.getExtra2(); + if (extra2 != null) { + stmt.bindString(7, extra2); + } + } + + @Override + protected final void bindValues(SQLiteStatement stmt, QueueItem entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Long queueNumber = entity.getQueueNumber(); + if (queueNumber != null) { + stmt.bindLong(2, queueNumber); + } + + Action action = entity.getAction(); + if (action != null) { + stmt.bindLong(3, actionConverter.convertToDatabaseValue(action)); + } + + Integer articleId = entity.getArticleId(); + if (articleId != null) { + stmt.bindLong(4, articleId); + } + + Long localArticleId = entity.getLocalArticleId(); + if (localArticleId != null) { + stmt.bindLong(5, localArticleId); + } + + String extra = entity.getExtra(); + if (extra != null) { + stmt.bindString(6, extra); + } + + String extra2 = entity.getExtra2(); + if (extra2 != null) { + stmt.bindString(7, extra2); + } + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public QueueItem readEntity(Cursor cursor, int offset) { + QueueItem entity = new QueueItem( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // queueNumber + cursor.isNull(offset + 2) ? null : actionConverter.convertToEntityProperty(cursor.getInt(offset + 2)), // action + cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3), // articleId + cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4), // localArticleId + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // extra + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6) // extra2 + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, QueueItem entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setQueueNumber(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1)); + entity.setAction(cursor.isNull(offset + 2) ? null : actionConverter.convertToEntityProperty(cursor.getInt(offset + 2))); + entity.setArticleId(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3)); + entity.setLocalArticleId(cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4)); + entity.setExtra(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); + entity.setExtra2(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); + } + + @Override + protected final Long updateKeyAfterInsert(QueueItem entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(QueueItem entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(QueueItem entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + +} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java new file mode 100644 index 000000000..20aa793dd --- /dev/null +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java @@ -0,0 +1,164 @@ +package fr.gaulupeau.apps.Poche.data.dao; + +import java.util.List; +import android.database.Cursor; +import android.database.sqlite.SQLiteStatement; + +import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; +import org.greenrobot.greendao.database.Database; +import org.greenrobot.greendao.database.DatabaseStatement; +import org.greenrobot.greendao.query.Query; +import org.greenrobot.greendao.query.QueryBuilder; + +import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleTagsJoin; + +import fr.gaulupeau.apps.Poche.data.dao.entities.Tag; + +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +/** + * DAO for table "TAG". +*/ +public class TagDao extends AbstractDao { + + public static final String TABLENAME = "TAG"; + + /** + * Properties of entity Tag.
+ * Can be used for QueryBuilder and for referencing column names. + */ + public static class Properties { + public final static Property Id = new Property(0, Long.class, "id", true, "_id"); + public final static Property TagId = new Property(1, Integer.class, "tagId", false, "TAG_ID"); + public final static Property Label = new Property(2, String.class, "label", false, "LABEL"); + } + + private Query article_TagsQuery; + + public TagDao(DaoConfig config) { + super(config); + } + + public TagDao(DaoConfig config, DaoSession daoSession) { + super(config, daoSession); + } + + /** Creates the underlying database table. */ + public static void createTable(Database db, boolean ifNotExists) { + String constraint = ifNotExists? "IF NOT EXISTS ": ""; + db.execSQL("CREATE TABLE " + constraint + "\"TAG\" (" + // + "\"_id\" INTEGER PRIMARY KEY ," + // 0: id + "\"TAG_ID\" INTEGER UNIQUE ," + // 1: tagId + "\"LABEL\" TEXT);"); // 2: label + } + + /** Drops the underlying database table. */ + public static void dropTable(Database db, boolean ifExists) { + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TAG\""; + db.execSQL(sql); + } + + @Override + protected final void bindValues(DatabaseStatement stmt, Tag entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Integer tagId = entity.getTagId(); + if (tagId != null) { + stmt.bindLong(2, tagId); + } + + String label = entity.getLabel(); + if (label != null) { + stmt.bindString(3, label); + } + } + + @Override + protected final void bindValues(SQLiteStatement stmt, Tag entity) { + stmt.clearBindings(); + + Long id = entity.getId(); + if (id != null) { + stmt.bindLong(1, id); + } + + Integer tagId = entity.getTagId(); + if (tagId != null) { + stmt.bindLong(2, tagId); + } + + String label = entity.getLabel(); + if (label != null) { + stmt.bindString(3, label); + } + } + + @Override + public Long readKey(Cursor cursor, int offset) { + return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); + } + + @Override + public Tag readEntity(Cursor cursor, int offset) { + Tag entity = new Tag( // + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1), // tagId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2) // label + ); + return entity; + } + + @Override + public void readEntity(Cursor cursor, Tag entity, int offset) { + entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); + entity.setTagId(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1)); + entity.setLabel(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); + } + + @Override + protected final Long updateKeyAfterInsert(Tag entity, long rowId) { + entity.setId(rowId); + return rowId; + } + + @Override + public Long getKey(Tag entity) { + if(entity != null) { + return entity.getId(); + } else { + return null; + } + } + + @Override + public boolean hasKey(Tag entity) { + return entity.getId() != null; + } + + @Override + protected final boolean isEntityUpdateable() { + return true; + } + + /** Internal query to resolve the "tags" to-many relationship of Article. */ + public List _queryArticle_Tags(Long articleId) { + synchronized (this) { + if (article_TagsQuery == null) { + QueryBuilder queryBuilder = queryBuilder(); + queryBuilder.join(ArticleTagsJoin.class, ArticleTagsJoinDao.Properties.TagId) + .where(ArticleTagsJoinDao.Properties.ArticleId.eq(articleId)); + article_TagsQuery = queryBuilder.build(); + } + } + Query query = article_TagsQuery.forCurrentThread(); + query.setParameter(0, articleId); + return query.list(); + } + +} diff --git a/build.gradle b/build.gradle index 1c332c3b3..9335d0319 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.4.1' - classpath 'org.greenrobot:greendao-gradle-plugin:3.3.1' } } From ced10d6c6b045bc5c767fb2b84fe61554ad84114 Mon Sep 17 00:00:00 2001 From: Dmitriy Bogdanov Date: Thu, 23 May 2024 21:52:04 +0200 Subject: [PATCH 2/2] Replace comments mentioning the plugin that should not be named --- .../java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java | 2 +- .../fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java | 2 +- .../fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java | 2 +- .../main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java | 2 +- .../fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java | 2 +- .../main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java | 2 +- .../main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java | 2 +- .../java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java | 2 +- app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java index f7ffb426d..4c825a437 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationDao.java @@ -14,7 +14,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.Annotation; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "ANNOTATION". */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java index 348c5f82f..584ad2436 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/AnnotationRangeDao.java @@ -14,7 +14,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.AnnotationRange; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "ANNOTATION_RANGE". */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java index a1df629fc..f2cfa3757 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleContentDao.java @@ -11,7 +11,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleContent; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "ARTICLE_CONTENT". */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java index b4e3acf8d..72cea17b3 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleDao.java @@ -11,7 +11,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.Article; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "ARTICLE". */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java index 438cf5974..08d79a131 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/ArticleTagsJoinDao.java @@ -11,7 +11,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.ArticleTagsJoin; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "ARTICLE_TAGS_JOIN". */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java index 19f4ca529..5a50d2fbf 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoMaster.java @@ -12,7 +12,7 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * Master of DAO (schema version 108): knows all DAOs. */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java index c33051c00..16c46fb89 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/DaoSession.java @@ -24,7 +24,7 @@ import fr.gaulupeau.apps.Poche.data.dao.QueueItemDao; import fr.gaulupeau.apps.Poche.data.dao.TagDao; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * {@inheritDoc} diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java index a6e844725..53af50f45 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/QueueItemDao.java @@ -14,7 +14,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.QueueItem; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "QUEUE_ITEM". */ diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java index 20aa793dd..388a78bd2 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/dao/TagDao.java @@ -16,7 +16,7 @@ import fr.gaulupeau.apps.Poche.data.dao.entities.Tag; -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. +// This code was generated, edit with caution /** * DAO for table "TAG". */