Java Code Examples for de.greenrobot.dao.AbstractDao

The following examples show how to use de.greenrobot.dao.AbstractDao. These examples are extracted from open source projects. 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 Project: iBeebo   Author: andforce   File: DaoSession.java    License: GNU General Public License v3.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    green_AccountBeanDaoConfig = daoConfigMap.get(Green_AccountBeanDao.class).clone();
    green_AccountBeanDaoConfig.initIdentityScope(type);

    green_AtUsersBeanDaoConfig = daoConfigMap.get(Green_AtUsersBeanDao.class).clone();
    green_AtUsersBeanDaoConfig.initIdentityScope(type);

    green_TimeLineStatusDaoConfig = daoConfigMap.get(Green_TimeLineStatusDao.class).clone();
    green_TimeLineStatusDaoConfig.initIdentityScope(type);

    green_AccountBeanDao = new Green_AccountBeanDao(green_AccountBeanDaoConfig, this);
    green_AtUsersBeanDao = new Green_AtUsersBeanDao(green_AtUsersBeanDaoConfig, this);
    green_TimeLineStatusDao = new Green_TimeLineStatusDao(green_TimeLineStatusDaoConfig, this);

    registerDao(Green_AccountBean.class, green_AccountBeanDao);
    registerDao(Green_AtUsersBean.class, green_AtUsersBeanDao);
    registerDao(Green_TimeLineStatus.class, green_TimeLineStatusDao);
}
 
Example #2
Source Project: Expert-Android-Programming   Author: PacktPublishing   File: DaoSession.java    License: MIT License 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    //MEMBERS ITEM
    restaurantImageDaoConfig = daoConfigMap.get(RestaurantImageDao.class).clone();
    restaurantImageDaoConfig.initIdentityScope(type);
    restaurantImageDao = new RestaurantImageDao(restaurantImageDaoConfig, this);
    registerDao(RestaurantImage.class, restaurantImageDao);

    //MEMBERS ITEM
    photoItemDaoConfig = daoConfigMap.get(PhotoItemDao.class).clone();
    photoItemDaoConfig.initIdentityScope(type);
    photoItemDao = new PhotoItemDao(photoItemDaoConfig, this);
    registerDao(PhotoItem.class, photoItemDao);

    //TODO ADD HERE
}
 
Example #3
Source Project: sealtalk-android   Author: wolipengbo   File: DaoSession.java    License: MIT License 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    friendDaoConfig = daoConfigMap.get(FriendDao.class).clone();
    friendDaoConfig.initIdentityScope(type);

    groupsDaoConfig = daoConfigMap.get(GroupsDao.class).clone();
    groupsDaoConfig.initIdentityScope(type);

    blackListDaoConfig = daoConfigMap.get(BlackListDao.class).clone();
    blackListDaoConfig.initIdentityScope(type);

    friendDao = new FriendDao(friendDaoConfig, this);
    groupsDao = new GroupsDao(groupsDaoConfig, this);
    blackListDao = new BlackListDao(blackListDaoConfig, this);

    registerDao(Friend.class, friendDao);
    registerDao(Groups.class, groupsDao);
    registerDao(BlackList.class, blackListDao);
}
 
Example #4
Source Project: RxJavaApp   Author: jiang111   File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    operatorsDaoConfig = daoConfigMap.get(operatorsDao.class).clone();
    operatorsDaoConfig.initIdentityScope(type);

    alloperatorsDaoConfig = daoConfigMap.get(alloperatorsDao.class).clone();
    alloperatorsDaoConfig.initIdentityScope(type);

    operatorsDao = new operatorsDao(operatorsDaoConfig, this);
    alloperatorsDao = new alloperatorsDao(alloperatorsDaoConfig, this);

    registerDao(operators.class, operatorsDao);
    registerDao(alloperators.class, alloperatorsDao);
}
 
Example #5
Source Project: AndroidDatabaseLibraryComparison   Author: Rightpoint   File: DaoSession.java    License: MIT License 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    simpleAddressItemDaoConfig = daoConfigMap.get(SimpleAddressItemDao.class).clone();
    simpleAddressItemDaoConfig.initIdentityScope(type);

    addressItemDaoConfig = daoConfigMap.get(AddressItemDao.class).clone();
    addressItemDaoConfig.initIdentityScope(type);

    contactDaoConfig = daoConfigMap.get(ContactDao.class).clone();
    contactDaoConfig.initIdentityScope(type);

    addressBookDaoConfig = daoConfigMap.get(AddressBookDao.class).clone();
    addressBookDaoConfig.initIdentityScope(type);

    simpleAddressItemDao = new SimpleAddressItemDao(simpleAddressItemDaoConfig, this);
    addressItemDao = new AddressItemDao(addressItemDaoConfig, this);
    contactDao = new ContactDao(contactDaoConfig, this);
    addressBookDao = new AddressBookDao(addressBookDaoConfig, this);

    registerDao(SimpleAddressItem.class, simpleAddressItemDao);
    registerDao(AddressItem.class, addressItemDao);
    registerDao(Contact.class, contactDao);
    registerDao(AddressBook.class, addressBookDao);
}
 
Example #6
Source Project: NBAPlus   Author: SilenceDut   File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    greenNewsDaoConfig = daoConfigMap.get(GreenNewsDao.class).clone();
    greenNewsDaoConfig.initIdentityScope(type);

    greenStatDaoConfig = daoConfigMap.get(GreenStatDao.class).clone();
    greenStatDaoConfig.initIdentityScope(type);

    greenNewsDao = new GreenNewsDao(greenNewsDaoConfig, this);
    greenStatDao = new GreenStatDao(greenStatDaoConfig, this);

    registerDao(GreenNews.class, greenNewsDao);
    registerDao(GreenStat.class, greenStatDao);
}
 
Example #7
Source Project: SweetMusicPlayer   Author: WellerV   File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    musicInfoDaoConfig = daoConfigMap.get(MusicInfoDao.class).clone();
    musicInfoDaoConfig.initIdentityScope(type);

    albumInfoDaoConfig = daoConfigMap.get(AlbumInfoDao.class).clone();
    albumInfoDaoConfig.initIdentityScope(type);

    artistInfoDaoConfig = daoConfigMap.get(ArtistInfoDao.class).clone();
    artistInfoDaoConfig.initIdentityScope(type);

    musicInfoDao = new MusicInfoDao(musicInfoDaoConfig, this);
    albumInfoDao = new AlbumInfoDao(albumInfoDaoConfig, this);
    artistInfoDao = new ArtistInfoDao(artistInfoDaoConfig, this);

    registerDao(MusicInfo.class, musicInfoDao);
    registerDao(AlbumInfo.class, albumInfoDao);
    registerDao(ArtistInfo.class, artistInfoDao);
}
 
Example #8
Source Project: Maps   Author: andforce   File: DaoSession.java    License: GNU General Public License v2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    bJCameraDaoConfig = daoConfigMap.get(BJCameraDao.class).clone();
    bJCameraDaoConfig.initIdentityScope(type);

    poiSearchTipDaoConfig = daoConfigMap.get(PoiSearchTipDao.class).clone();
    poiSearchTipDaoConfig.initIdentityScope(type);

    bJCameraDao = new BJCameraDao(bJCameraDaoConfig, this);
    poiSearchTipDao = new PoiSearchTipDao(poiSearchTipDaoConfig, this);

    registerDao(BJCamera.class, bJCameraDao);
    registerDao(PoiSearchTip.class, poiSearchTipDao);
}
 
Example #9
Source Project: iBeebo   Author: andforce   File: DaoSession.java    License: GNU General Public License v3.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    green_AccountBeanDaoConfig = daoConfigMap.get(Green_AccountBeanDao.class).clone();
    green_AccountBeanDaoConfig.initIdentityScope(type);

    green_AtUsersBeanDaoConfig = daoConfigMap.get(Green_AtUsersBeanDao.class).clone();
    green_AtUsersBeanDaoConfig.initIdentityScope(type);

    green_TimeLineStatusDaoConfig = daoConfigMap.get(Green_TimeLineStatusDao.class).clone();
    green_TimeLineStatusDaoConfig.initIdentityScope(type);

    green_AccountBeanDao = new Green_AccountBeanDao(green_AccountBeanDaoConfig, this);
    green_AtUsersBeanDao = new Green_AtUsersBeanDao(green_AtUsersBeanDaoConfig, this);
    green_TimeLineStatusDao = new Green_TimeLineStatusDao(green_TimeLineStatusDaoConfig, this);

    registerDao(Green_AccountBean.class, green_AccountBeanDao);
    registerDao(Green_AtUsersBean.class, green_AtUsersBeanDao);
    registerDao(Green_TimeLineStatus.class, green_TimeLineStatusDao);
}
 
Example #10
Source Project: DMusic   Author: Dsiner   File: AbstractOp.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 插入一条记录
 */
protected void insert(AbstractDao dao, Object o) {
    if (dao == null || o == null) {
        return;
    }
    dao.insert(o);
}
 
Example #11
Source Project: DMusic   Author: Dsiner   File: AbstractOp.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 插入一条记录
 */
protected void insertOrReplace(AbstractDao dao, Object o) {
    if (dao == null || o == null) {
        return;
    }
    dao.insertOrReplace(o);
}
 
Example #12
Source Project: DMusic   Author: Dsiner   File: AbstractOp.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 删除表中所有记录
 */
protected void deleteAll(AbstractDao dao) {
    if (dao == null) {
        return;
    }
    dao.deleteAll();
}
 
Example #13
Source Project: DMusic   Author: Dsiner   File: AbstractOp.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 删除表中一条记录
 *
 * @param id: 主键
 */
protected void deleteById(AbstractDao dao, Long id) {
    if (dao == null) {
        return;
    }
    dao.deleteByKey(id);
}
 
Example #14
Source Project: UltimateAndroid   Author: cymcsg   File: GreenDaoUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static List getList(AbstractDao dao, Property orderProperty, WhereCondition cond, WhereCondition... condMore) {
    setIfLog();
    List indexFavList = dao.queryBuilder()
            .where(cond, condMore)
            .orderAsc(orderProperty)
            .list();
    return indexFavList;
}
 
Example #15
Source Project: sctalk   Author: ccfish86   File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    departmentDaoConfig = daoConfigMap.get(DepartmentDao.class).clone();
    departmentDaoConfig.initIdentityScope(type);

    userDaoConfig = daoConfigMap.get(UserDao.class).clone();
    userDaoConfig.initIdentityScope(type);

    groupDaoConfig = daoConfigMap.get(GroupDao.class).clone();
    groupDaoConfig.initIdentityScope(type);

    messageDaoConfig = daoConfigMap.get(MessageDao.class).clone();
    messageDaoConfig.initIdentityScope(type);

    sessionDaoConfig = daoConfigMap.get(SessionDao.class).clone();
    sessionDaoConfig.initIdentityScope(type);

    departmentDao = new DepartmentDao(departmentDaoConfig, this);
    userDao = new UserDao(userDaoConfig, this);
    groupDao = new GroupDao(groupDaoConfig, this);
    messageDao = new MessageDao(messageDaoConfig, this);
    sessionDao = new SessionDao(sessionDaoConfig, this);

    registerDao(DepartmentEntity.class, departmentDao);
    registerDao(UserEntity.class, userDao);
    registerDao(GroupEntity.class, groupDao);
    registerDao(MessageEntity.class, messageDao);
    registerDao(SessionEntity.class, sessionDao);
}
 
Example #16
Source Project: Dota2Helper   Author: uin3566   File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    greenNewsDaoConfig = daoConfigMap.get(GreenNewsDao.class).clone();
    greenNewsDaoConfig.initIdentityScope(type);

    greenStrategyDaoConfig = daoConfigMap.get(GreenStrategyDao.class).clone();
    greenStrategyDaoConfig.initIdentityScope(type);

    greenUpdateDaoConfig = daoConfigMap.get(GreenUpdateDao.class).clone();
    greenUpdateDaoConfig.initIdentityScope(type);

    greenVideoDaoConfig = daoConfigMap.get(GreenVideoDao.class).clone();
    greenVideoDaoConfig.initIdentityScope(type);

    greenWatchedVideoDaoConfig = daoConfigMap.get(GreenWatchedVideoDao.class).clone();
    greenWatchedVideoDaoConfig.initIdentityScope(type);

    greenNewsDao = new GreenNewsDao(greenNewsDaoConfig, this);
    greenStrategyDao = new GreenStrategyDao(greenStrategyDaoConfig, this);
    greenUpdateDao = new GreenUpdateDao(greenUpdateDaoConfig, this);
    greenVideoDao = new GreenVideoDao(greenVideoDaoConfig, this);
    greenWatchedVideoDao = new GreenWatchedVideoDao(greenWatchedVideoDaoConfig, this);

    registerDao(GreenNews.class, greenNewsDao);
    registerDao(GreenStrategy.class, greenStrategyDao);
    registerDao(GreenUpdate.class, greenUpdateDao);
    registerDao(GreenVideo.class, greenVideoDao);
    registerDao(GreenWatchedVideo.class, greenWatchedVideoDao);
}
 
Example #17
Source Project: octoandroid   Author: nairbspace   File: DaoSession.java    License: GNU General Public License v3.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    printerDbEntityDaoConfig = daoConfigMap.get(PrinterDbEntityDao.class).clone();
    printerDbEntityDaoConfig.initIdentityScope(type);

    printerDbEntityDao = new PrinterDbEntityDao(printerDbEntityDaoConfig, this);

    registerDao(PrinterDbEntity.class, printerDbEntityDao);
}
 
Example #18
Source Project: UltimateAndroid   Author: cymcsg   File: GreenDaoUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static List getList(AbstractDao dao, boolean isAsc, Property... orderProperty) {
    setIfLog();
    QueryBuilder queryBuilder = dao.queryBuilder();
    if (isAsc) {
        queryBuilder = queryBuilder.orderAsc(orderProperty);
    } else {
        queryBuilder = queryBuilder.orderDesc(orderProperty);
    }
    List indexFavList = queryBuilder.list();
    return indexFavList;
}
 
Example #19
Source Project: MeiZiNews   Author: qq137712630   File: MigrationHelper.java    License: MIT License 5 votes vote down vote up
private void restoreData(SQLiteDatabase db, Class<? extends AbstractDao<?, ?>>... daoClasses) {
    for(int i = 0; i < daoClasses.length; i++) {
        DaoConfig daoConfig = new DaoConfig(db, daoClasses[i]);

        String tableName = daoConfig.tablename;
        String tempTableName = daoConfig.tablename.concat("_TEMP");
        ArrayList<String> properties = new ArrayList();

        for (int j = 0; j < daoConfig.properties.length; j++) {
            String columnName = daoConfig.properties[j].columnName;

            if(getColumns(db, tempTableName).contains(columnName)) {
                properties.add(columnName);
            }
        }

        StringBuilder insertTableStringBuilder = new StringBuilder();

        insertTableStringBuilder.append("INSERT INTO ").append(tableName).append(" (");
        insertTableStringBuilder.append(TextUtils.join(",", properties));
        insertTableStringBuilder.append(") SELECT ");
        insertTableStringBuilder.append(TextUtils.join(",", properties));
        insertTableStringBuilder.append(" FROM ").append(tempTableName).append(";");

        StringBuilder dropTableStringBuilder = new StringBuilder();

        dropTableStringBuilder.append("DROP TABLE ").append(tempTableName);

        db.execSQL(insertTableStringBuilder.toString());
        db.execSQL(dropTableStringBuilder.toString());
    }
}
 
Example #20
Source Project: ZhiHu-TopAnswer   Author: jiang111   File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    collectionDaoConfig = daoConfigMap.get(CollectionDao.class).clone();
    collectionDaoConfig.initIdentityScope(type);

    collectionDao = new CollectionDao(collectionDaoConfig, this);

    registerDao(Collection.class, collectionDao);
}
 
Example #21
Source Project: JianDan   Author: ZhaoKaiQiang   File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    jokeCacheDaoConfig = daoConfigMap.get(JokeCacheDao.class).clone();
    jokeCacheDaoConfig.initIdentityScope(type);

    freshNewsCacheDaoConfig = daoConfigMap.get(FreshNewsCacheDao.class).clone();
    freshNewsCacheDaoConfig.initIdentityScope(type);

    pictureCacheDaoConfig = daoConfigMap.get(PictureCacheDao.class).clone();
    pictureCacheDaoConfig.initIdentityScope(type);

    sisterCacheDaoConfig = daoConfigMap.get(SisterCacheDao.class).clone();
    sisterCacheDaoConfig.initIdentityScope(type);

    videoCacheDaoConfig = daoConfigMap.get(VideoCacheDao.class).clone();
    videoCacheDaoConfig.initIdentityScope(type);

    jokeCacheDao = new JokeCacheDao(jokeCacheDaoConfig, this);
    freshNewsCacheDao = new FreshNewsCacheDao(freshNewsCacheDaoConfig, this);
    pictureCacheDao = new PictureCacheDao(pictureCacheDaoConfig, this);
    sisterCacheDao = new SisterCacheDao(sisterCacheDaoConfig, this);
    videoCacheDao = new VideoCacheDao(videoCacheDaoConfig, this);

    registerDao(JokeCache.class, jokeCacheDao);
    registerDao(FreshNewsCache.class, freshNewsCacheDao);
    registerDao(PictureCache.class, pictureCacheDao);
    registerDao(SisterCache.class, sisterCacheDao);
    registerDao(VideoCache.class, videoCacheDao);
}
 
Example #22
Source Project: anetty_client   Author: maofw   File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    deviceDaoConfig = daoConfigMap.get(DeviceDao.class).clone();
    deviceDaoConfig.initIdentityScope(type);

    deviceDao = new DeviceDao(deviceDaoConfig, this);

    registerDao(Device.class, deviceDao);
}
 
Example #23
Source Project: MiBandDecompiled   Author: vishnudevk   File: Query.java    License: Apache License 2.0 5 votes vote down vote up
private Query(QueryData querydata, AbstractDao abstractdao, String s, String as[], int i, int j)
{
    super(abstractdao, s, as);
    queryData = querydata;
    limitPosition = i;
    offsetPosition = j;
}
 
Example #24
Source Project: MiBandDecompiled   Author: vishnudevk   File: QueryBuilder.java    License: Apache License 2.0 5 votes vote down vote up
protected QueryBuilder(AbstractDao abstractdao, String s)
{
    dao = abstractdao;
    tablePrefix = s;
    values = new ArrayList();
    whereConditions = new ArrayList();
}
 
Example #25
Source Project: MiBandDecompiled   Author: vishnudevk   File: AbstractQuery.java    License: Apache License 2.0 5 votes vote down vote up
protected AbstractQuery(AbstractDao abstractdao, String s, String as[])
{
    dao = abstractdao;
    daoAccess = new InternalQueryDaoAccess(abstractdao);
    sql = s;
    parameters = as;
}
 
Example #26
Source Project: MiBandDecompiled   Author: vishnudevk   File: AbstractDaoTestSinglePk.java    License: Apache License 2.0 5 votes vote down vote up
public void testQuery()
{
    dao.insert(createEntityWithRandomPk());
    Object obj = nextPk();
    dao.insert(createEntity(obj));
    dao.insert(createEntityWithRandomPk());
    String s = (new StringBuilder()).append("WHERE ").append(dao.getPkColumns()[0]).append("=?").toString();
    AbstractDao abstractdao = dao;
    String as[] = new String[1];
    as[0] = obj.toString();
    List list = abstractdao.queryRaw(s, as);
    assertEquals(1, list.size());
    assertEquals(obj, daoAccess.getKey(list.get(0)));
}
 
Example #27
Source Project: MiBandDecompiled   Author: vishnudevk   File: AsyncOperation.java    License: Apache License 2.0 5 votes vote down vote up
AsyncOperation(OperationType operationtype, AbstractDao abstractdao, Object obj, int i)
{
    type = operationtype;
    flags = i;
    dao = abstractdao;
    database = null;
    parameter = obj;
}
 
Example #28
Source Project: WaveHeartRate   Author: Sherchen   File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    historyEntityDaoConfig = daoConfigMap.get(HistoryEntityDao.class).clone();
    historyEntityDaoConfig.initIdentityScope(type);

    historyEntityDao = new HistoryEntityDao(historyEntityDaoConfig, this);

    registerDao(HistoryEntity.class, historyEntityDao);
}
 
Example #29
Source Project: UltimateAndroid   Author: cymcsg   File: GreenDaoUtils.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @see #getList(de.greenrobot.dao.AbstractDao, de.greenrobot.dao.Property, de.greenrobot.dao.query.WhereCondition, de.greenrobot.dao.query.WhereCondition...)
 * @param dao
 * @param whereCondition
 * @param whereConditions
 * @return
 */
public static List getList(AbstractDao dao, WhereCondition whereCondition, WhereCondition... whereConditions) {
    setIfLog();
    List indexFavList = dao.queryBuilder()
            .where(whereCondition, whereConditions)
            .list();
    return indexFavList;
}
 
Example #30
Source Project: UltimateAndroid   Author: cymcsg   File: GreenDaoUtils.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Executes the query and returns the result as a list containing all entities loaded into memory.
 * @param dao
 * @param orderProperty
 * @param whereCondition
 * @param whereConditions
 * @return
 */
public static List getList(AbstractDao dao, Property orderProperty, WhereCondition whereCondition, WhereCondition... whereConditions) {
    setIfLog();
    List indexFavList = dao.queryBuilder()
            .where(whereCondition, whereConditions)
            .orderAsc(orderProperty)
            .list();
    return indexFavList;
}