org.greenrobot.greendao.DaoException Java Examples

The following examples show how to use org.greenrobot.greendao.DaoException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Question.java    From Pretty-Zhihu with Apache License 2.0 6 votes vote down vote up
/**
 * To-many relationship, resolved on first access (and after reset).
 * Changes to to-many relations are not persisted, make changes to the target entity.
 */
@Generated(hash = 1043365398)
public List<Picture> getPictures() {
    if (pictures == null) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        PictureDao targetDao = daoSession.getPictureDao();
        List<Picture> picturesNew = targetDao._queryQuestion_Pictures(questionId);
        synchronized (this) {
            if (pictures == null) {
                pictures = picturesNew;
            }
        }
    }
    return pictures;
}
 
Example #2
Source File: LocalKino.java    From CineLog with GNU General Public License v3.0 6 votes vote down vote up
/**
 * To-one relationship, resolved on first access.
 */
@Generated(hash = 1387996076)
public TmdbKino getKino() {
    long __key = this.tmdb_id;
    if (kino__resolvedKey == null || !kino__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        TmdbKinoDao targetDao = daoSession.getTmdbKinoDao();
        TmdbKino kinoNew = targetDao.load(__key);
        synchronized (this) {
            kino = kinoNew;
            kino__resolvedKey = __key;
        }
    }
    return kino;
}
 
Example #3
Source File: Question.java    From android-mvp-architecture with Apache License 2.0 6 votes vote down vote up
/**
 * To-many relationship, resolved on first access (and after reset).
 * Changes to to-many relations are not persisted, make changes to the target entity.
 */
@Generated(hash = 1773152342)
public List<Option> getOptionList() {
    if (optionList == null) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        OptionDao targetDao = daoSession.getOptionDao();
        List<Option> optionListNew = targetDao._queryQuestion_OptionList(id);
        synchronized (this) {
            if (optionList == null) {
                optionList = optionListNew;
            }
        }
    }
    return optionList;
}
 
Example #4
Source File: CollBookBean.java    From NovelReader with MIT License 6 votes vote down vote up
/**
 * To-many relationship, resolved on first access (and after reset).
 * Changes to to-many relations are not persisted, make changes to the target entity.
 */
@Generated(hash = 711740787)
public List<BookChapterBean> getBookChapterList() {
    if (bookChapterList == null) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        BookChapterBeanDao targetDao = daoSession.getBookChapterBeanDao();
        List<BookChapterBean> bookChapterListNew = targetDao
                ._queryCollBookBean_BookChapterList(_id);
        synchronized (this) {
            if (bookChapterList == null) {
                bookChapterList = bookChapterListNew;
            }
        }
    }
    return bookChapterList;
}
 
Example #5
Source File: WishlistSerie.java    From CineLog with GNU General Public License v3.0 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 1090761680)
public TmdbSerie getSerie() {
    long __key = this.tmdb_id;
    if (serie__resolvedKey == null || !serie__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        TmdbSerieDao targetDao = daoSession.getTmdbSerieDao();
        TmdbSerie serieNew = targetDao.load(__key);
        synchronized (this) {
            serie = serieNew;
            serie__resolvedKey = __key;
        }
    }
    return serie;
}
 
Example #6
Source File: SerieReview.java    From CineLog with GNU General Public License v3.0 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 1090761680)
public TmdbSerie getSerie() {
    long __key = this.tmdb_id;
    if (serie__resolvedKey == null || !serie__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        TmdbSerieDao targetDao = daoSession.getTmdbSerieDao();
        TmdbSerie serieNew = targetDao.load(__key);
        synchronized (this) {
            serie = serieNew;
            serie__resolvedKey = __key;
        }
    }
    return serie;
}
 
Example #7
Source File: SerieEpisode.java    From CineLog with GNU General Public License v3.0 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 1090761680)
public TmdbSerie getSerie() {
    long __key = this.tmdb_id;
    if (serie__resolvedKey == null || !serie__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        TmdbSerieDao targetDao = daoSession.getTmdbSerieDao();
        TmdbSerie serieNew = targetDao.load(__key);
        synchronized (this) {
            serie = serieNew;
            serie__resolvedKey = __key;
        }
    }
    return serie;
}
 
Example #8
Source File: BookReviewBean.java    From NovelReader with MIT License 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 1574749097)
public ReviewBookBean getBook() {
    String __key = this.bookId;
    if (book__resolvedKey == null || book__resolvedKey != __key) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        ReviewBookBeanDao targetDao = daoSession.getReviewBookBeanDao();
        ReviewBookBean bookNew = targetDao.load(__key);
        synchronized (this) {
            book = bookNew;
            book__resolvedKey = __key;
        }
    }
    return book;
}
 
Example #9
Source File: BookReviewBean.java    From NovelReader with MIT License 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 2081731991)
public BookHelpfulBean getHelpful() {
    String __key = this._id;
    if (helpful__resolvedKey == null || helpful__resolvedKey != __key) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        BookHelpfulBeanDao targetDao = daoSession.getBookHelpfulBeanDao();
        BookHelpfulBean helpfulNew = targetDao.load(__key);
        synchronized (this) {
            helpful = helpfulNew;
            helpful__resolvedKey = __key;
        }
    }
    return helpful;
}
 
Example #10
Source File: SerieReview.java    From CineLog with GNU General Public License v3.0 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 654994440)
public Review getReview() {
    long __key = this.review_id;
    if (review__resolvedKey == null || !review__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        ReviewDao targetDao = daoSession.getReviewDao();
        Review reviewNew = targetDao.load(__key);
        synchronized (this) {
            review = reviewNew;
            review__resolvedKey = __key;
        }
    }
    return review;
}
 
Example #11
Source File: V9PornItem.java    From v9porn with MIT License 6 votes vote down vote up
/**
 * To-one relationship, resolved on first access.
 */
@Generated(hash = 1066672592)
public VideoResult getVideoResult() {
    long __key = this.videoResultId;
    if (videoResult__resolvedKey == null || !videoResult__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        VideoResultDao targetDao = daoSession.getVideoResultDao();
        VideoResult videoResultNew = targetDao.load(__key);
        synchronized (this) {
            videoResult = videoResultNew;
            videoResult__resolvedKey = __key;
        }
    }
    return videoResult;
}
 
Example #12
Source File: V9PornItem.java    From v9porn with MIT License 6 votes vote down vote up
/**
 * To-one relationship, resolved on first access.
 */
@Generated(hash = 1066672592)
public VideoResult getVideoResult() {
    long __key = this.videoResultId;
    if (videoResult__resolvedKey == null || !videoResult__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        VideoResultDao targetDao = daoSession.getVideoResultDao();
        VideoResult videoResultNew = targetDao.load(__key);
        synchronized (this) {
            videoResult = videoResultNew;
            videoResult__resolvedKey = __key;
        }
    }
    return videoResult;
}
 
Example #13
Source File: BookHelpsBean.java    From NovelReader with MIT License 6 votes vote down vote up
/** To-one relationship, resolved on first access. */
@Generated(hash = 625279819)
public AuthorBean getAuthor() {
    String __key = this.authorId;
    if (author__resolvedKey == null || author__resolvedKey != __key) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        AuthorBeanDao targetDao = daoSession.getAuthorBeanDao();
        AuthorBean authorNew = targetDao.load(__key);
        synchronized (this) {
            author = authorNew;
            author__resolvedKey = __key;
        }
    }
    return author;
}
 
Example #14
Source File: CourseGroup.java    From ClassSchedule with Apache License 2.0 6 votes vote down vote up
/**
 * To-many relationship, resolved on first access (and after reset).
 * Changes to to-many relations are not persisted, make changes to the target entity.
 */
@Generated(hash = 136005675)
public List<CourseV2> getCgItems() {
    if (cgItems == null) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        CourseV2Dao targetDao = daoSession.getCourseV2Dao();
        List<CourseV2> cgItemsNew = targetDao._queryCourseGroup_CgItems(cgId);
        synchronized (this) {
            if (cgItems == null) {
                cgItems = cgItemsNew;
            }
        }
    }
    return cgItems;
}
 
Example #15
Source File: Note.java    From DevUtils with Apache License 2.0 6 votes vote down vote up
/**
 * To-many relationship, resolved on first access (and after reset).
 * Changes to to-many relations are not persisted, make changes to the target entity.
 */
@Generated(hash = 465103477)
public List<NotePicture> getPictures() {
    if (pictures == null) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        NotePictureDao targetDao = daoSession.getNotePictureDao();
        List<NotePicture> picturesNew = targetDao._queryNote_Pictures(id);
        synchronized (this) {
            if (pictures == null) {
                pictures = picturesNew;
            }
        }
    }
    return pictures;
}
 
Example #16
Source File: WishlistMovie.java    From CineLog with GNU General Public License v3.0 6 votes vote down vote up
/**
 * To-one relationship, resolved on first access.
 */
@Generated(hash = 2004684038)
public TmdbKino getMovie() {
    long __key = this.tmdb_id;
    if (movie__resolvedKey == null || !movie__resolvedKey.equals(__key)) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        TmdbKinoDao targetDao = daoSession.getTmdbKinoDao();
        TmdbKino movieNew = targetDao.load(__key);
        synchronized (this) {
            movie = movieNew;
            movie__resolvedKey = __key;
        }
    }
    return movie;
}
 
Example #17
Source File: Question.java    From android-mvp-interactor-architecture with Apache License 2.0 6 votes vote down vote up
/**
 * To-many relationship, resolved on first access (and after reset).
 * Changes to to-many relations are not persisted, make changes to the target entity.
 */
@Generated(hash = 1773152342)
public List<Option> getOptionList() {
    if (optionList == null) {
        final DaoSession daoSession = this.daoSession;
        if (daoSession == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        OptionDao targetDao = daoSession.getOptionDao();
        List<Option> optionListNew = targetDao._queryQuestion_OptionList(id);
        synchronized (this) {
            if (optionList == null) {
                optionList = optionListNew;
            }
        }
    }
    return optionList;
}
 
Example #18
Source File: Question.java    From Pretty-Zhihu with Apache License 2.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 128553479)
public void delete() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.delete(this);
}
 
Example #19
Source File: DownloadTaskBean.java    From NovelReader with MIT License 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 1942392019)
public void refresh() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.refresh(this);
}
 
Example #20
Source File: DownloadTaskBean.java    From NovelReader with MIT License 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 713229351)
public void update() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.update(this);
}
 
Example #21
Source File: BookHelpsBean.java    From NovelReader with MIT License 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 128553479)
public void delete() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.delete(this);
}
 
Example #22
Source File: BookHelpsBean.java    From NovelReader with MIT License 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 713229351)
public void update() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.update(this);
}
 
Example #23
Source File: Question.java    From android-mvp-interactor-architecture with Apache License 2.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 1942392019)
public void refresh() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.refresh(this);
}
 
Example #24
Source File: Question.java    From Pretty-Zhihu with Apache License 2.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 713229351)
public void update() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.update(this);
}
 
Example #25
Source File: Question.java    From Pretty-Zhihu with Apache License 2.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 1942392019)
public void refresh() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.refresh(this);
}
 
Example #26
Source File: CollBookBean.java    From NovelReader with MIT License 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 128553479)
public void delete() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.delete(this);
}
 
Example #27
Source File: BookTb.java    From FriendBook with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 713229351)
public void update() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.update(this);
}
 
Example #28
Source File: BookTb.java    From FriendBook with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 1942392019)
public void refresh() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.refresh(this);
}
 
Example #29
Source File: BookTb.java    From FriendBook with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 128553479)
public void delete() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.delete(this);
}
 
Example #30
Source File: SearchHistory.java    From FriendBook with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
 * Entity must attached to an entity context.
 */
@Generated(hash = 713229351)
public void update() {
    if (myDao == null) {
        throw new DaoException("Entity is detached from DAO context");
    }
    myDao.update(this);
}