Java Code Examples for de.greenrobot.dao.query.QueryBuilder#build()

The following examples show how to use de.greenrobot.dao.query.QueryBuilder#build() . 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: ChallengeDao.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
/** Internal query to resolve the "challenges" to-many relationship of Category. */
public List<Challenge> _queryCategory_Challenges(long categoryId) {
    synchronized (this) {
        if (category_ChallengesQuery == null) {
            QueryBuilder<Challenge> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.CategoryId.eq(null));
            category_ChallengesQuery = queryBuilder.build();
        }
    }
    Query<Challenge> query = category_ChallengesQuery.forCurrentThread();
    query.setParameter(0, categoryId);
    return query.list();
}
 
Example 2
Source File: CompletionDao.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
/** Internal query to resolve the "completions" to-many relationship of User. */
public List<Completion> _queryUser_Completions(long userId) {
    synchronized (this) {
        if (user_CompletionsQuery == null) {
            QueryBuilder<Completion> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.UserId.eq(null));
            user_CompletionsQuery = queryBuilder.build();
        }
    }
    Query<Completion> query = user_CompletionsQuery.forCurrentThread();
    query.setParameter(0, userId);
    return query.list();
}
 
Example 3
Source File: StatisticsDao.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
/** Internal query to resolve the "statistics" to-many relationship of User. */
public List<Statistics> _queryUser_Statistics(long userId) {
    synchronized (this) {
        if (user_StatisticsQuery == null) {
            QueryBuilder<Statistics> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.UserId.eq(null));
            user_StatisticsQuery = queryBuilder.build();
        }
    }
    Query<Statistics> query = user_StatisticsQuery.forCurrentThread();
    query.setParameter(0, userId);
    return query.list();
}
 
Example 4
Source File: AnswerDao.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
/** Internal query to resolve the "answers" to-many relationship of Challenge. */
public List<Answer> _queryChallenge_Answers(long challengeId) {
    synchronized (this) {
        if (challenge_AnswersQuery == null) {
            QueryBuilder<Answer> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.ChallengeId.eq(null));
            challenge_AnswersQuery = queryBuilder.build();
        }
    }
    Query<Answer> query = challenge_AnswersQuery.forCurrentThread();
    query.setParameter(0, challengeId);
    return query.list();
}
 
Example 5
Source File: alloperatorsDao.java    From RxJavaApp with Apache License 2.0 5 votes vote down vote up
/** Internal query to resolve the "alloperatorsList" to-many relationship of operators. */
public List<alloperators> _queryOperators_AlloperatorsList(Long outer_id) {
    synchronized (this) {
        if (operators_AlloperatorsListQuery == null) {
            QueryBuilder<alloperators> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.Outer_id.eq(null));
            operators_AlloperatorsListQuery = queryBuilder.build();
        }
    }
    Query<alloperators> query = operators_AlloperatorsListQuery.forCurrentThread();
    query.setParameter(0, outer_id);
    return query.list();
}
 
Example 6
Source File: ContactDao.java    From AndroidDatabaseLibraryComparison with MIT License 5 votes vote down vote up
/** Internal query to resolve the "contactList" to-many relationship of AddressBook. */
public List<Contact> _queryAddressBook_ContactList(Long id) {
    synchronized (this) {
        if (addressBook_ContactListQuery == null) {
            QueryBuilder<Contact> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.Id.eq(null));
            addressBook_ContactListQuery = queryBuilder.build();
        }
    }
    Query<Contact> query = addressBook_ContactListQuery.forCurrentThread();
    query.setParameter(0, id);
    return query.list();
}
 
Example 7
Source File: AddressItemDao.java    From AndroidDatabaseLibraryComparison with MIT License 5 votes vote down vote up
/** Internal query to resolve the "addressItemList" to-many relationship of AddressBook. */
public List<AddressItem> _queryAddressBook_AddressItemList(Long id) {
    synchronized (this) {
        if (addressBook_AddressItemListQuery == null) {
            QueryBuilder<AddressItem> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.Id.eq(null));
            addressBook_AddressItemListQuery = queryBuilder.build();
        }
    }
    Query<AddressItem> query = addressBook_AddressItemListQuery.forCurrentThread();
    query.setParameter(0, id);
    return query.list();
}
 
Example 8
Source File: UserDao.java    From android-orm-benchmark with Apache License 2.0 5 votes vote down vote up
/** Internal query to resolve the "readers" to-many relationship of Message. */
public List<User> _queryMessage_Readers(Long id) {
    synchronized (this) {
        if (message_ReadersQuery == null) {
            QueryBuilder<User> queryBuilder = queryBuilder();
            queryBuilder.where(Properties.Id.eq(null));
            message_ReadersQuery = queryBuilder.build();
        }
    }
    Query<User> query = message_ReadersQuery.forCurrentThread();
    query.setParameter(0, id);
    return query.list();
}