Java Code Examples for com.lidroid.xutils.DbUtils#findAll()

The following examples show how to use com.lidroid.xutils.DbUtils#findAll() . 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: EmojiDb.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static List<EmoticonBean> getAllEmojis(Context context) {
    DbUtils dbUtils = DbUtils.create(context, DB_NAME, DB_VERSION, null);
    try {
        return dbUtils.findAll(EmoticonBean.class);
    } catch (DbException e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 2
Source File: EmojiDb.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static List<EmoticonBean> getEmojiGroup(Context context, String group) {
    DbUtils dbUtils = DbUtils.create(context, DB_NAME, DB_VERSION, null);
    try {
        return dbUtils.findAll(Selector.from(EmoticonBean.class).where("groupName", "=", group));
    } catch (DbException e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 3
Source File: EmojiDb.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static List<EmoticonSetBean> getAllEmojiSet(Context context) {
    DbUtils dbUtils = DbUtils.create(context, DB_NAME, DB_VERSION, null);
    try {
        List<EmoticonSetBean> setBean = dbUtils.findAll(EmoticonSetBean.class);
        return setBean;
    } catch (DbException e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 4
Source File: DingCaiDAO.java    From QiQuYing with Apache License 2.0 5 votes vote down vote up
/**
 * 查找未同步到服务器的点赞数据
 * @return
 */
public List<DingOrCai> getUnUpload() {
	DbUtils db = DbUtils.create(context);
	List<DingOrCai> dbModels = null;
	try {
		dbModels = db.findAll(Selector.from(DingOrCai.class).where(WhereBuilder.b("is_upload", "=", DingOrCai.NOT_UPLOAD)));
		Log.d(TAG, "getUnUpload success");
	} catch (DbException e) {
		Log.d(TAG, "getUnUpload failure", e);
	}
	return dbModels;
}
 
Example 5
Source File: CollectDAO.java    From QiQuYing with Apache License 2.0 5 votes vote down vote up
/**
 * 获取我的收藏
 * @param userId
 * @return
 */
public List<Collect> getCollects(int userId) {
	DbUtils db = DbUtils.create(context);
	List<Collect> dbModels = null;
	try {
		dbModels = db.findAll(Selector.from(Collect.class).
				where(WhereBuilder.b("user_id", "=", userId))
				.orderBy("create_at", true));
		Log.d(TAG, "getCollects success");
	} catch (DbException e) {
		Log.e(TAG, "getCollects failure", e);
	}
	return dbModels;
}