本文整理汇总了Java中de.greenrobot.dao.query.LazyList类的典型用法代码示例。如果您正苦于以下问题:Java LazyList类的具体用法?Java LazyList怎么用?Java LazyList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LazyList类属于de.greenrobot.dao.query包,在下文中一共展示了LazyList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: updateLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
private void updateLazyList() {
LazyList<ACRecordRaw> lazyList = DB.getACRecordLazyList();
if (mLazyList != null) {
mLazyList.close();
}
mLazyList = lazyList;
}
开发者ID:seven332,项目名称:Nimingban,代码行数:8,代码来源:RecordActivity.java
示例2: updateLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
private void updateLazyList() {
LazyList<DraftRaw> lazyList = DB.getDraftLazyList();
if (mLazyList != null) {
mLazyList.close();
}
mLazyList = lazyList;
}
开发者ID:seven332,项目名称:Nimingban,代码行数:8,代码来源:DraftActivity.java
示例3: updateLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
private void updateLazyList(boolean animation) {
LazyList<ACForumRaw> lazyList = DB.getACForumLazyList();
if (mLazyList != null) {
mLazyList.close();
}
mLazyList = lazyList;
mViewTransition.showView(mLazyList.isEmpty() ? 0 : 1, animation);
}
开发者ID:seven332,项目名称:Nimingban,代码行数:10,代码来源:SortForumsActivity.java
示例4: updateLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
private void updateLazyList() {
LazyList<HistoryInfo> lazyList = EhDB.getHistoryLazyList();
if (mLazyList != null) {
mLazyList.close();
}
mLazyList = lazyList;
}
开发者ID:seven332,项目名称:EhViewer,代码行数:8,代码来源:HistoryScene.java
示例5: setLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public void setLazyList(LazyList<T> list) {
if (list != _lazyList) {
_lazyList.close();
_lazyList = list;
notifyDataSetChanged();
}
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:8,代码来源:AbstractLazyListAdapter.java
示例6: serialize
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public static void serialize(Context context, LazyList<Item> items, StringBuilder builder) {
Map<Integer, String> map = buildMapping(context);
for (Item item: items) {
builder.append(map.get(item.getStatus()));
builder.append(item.getName()).append('\n');
}
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:8,代码来源:Operations.java
示例7: createList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
@Override
protected LazyList<Item> createList(Context context) {
QueryBuilder builder = getSession().getItemDao().queryBuilder();
builder.where(builder.or(ItemDao.Properties.Status.eq(Checkable.CHECKED),
ItemDao.Properties.Status.eq(Checkable.UNCHECKED)));
builder.orderAsc(ItemDao.Properties.Name);
return builder.listLazy();
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:9,代码来源:CheckingFragment.java
示例8: createList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
@Override
protected LazyList<Item> createList(Context context) {
QueryBuilder builder = getSession().getItemDao().queryBuilder();
String constraint = null;
boolean doShow = false;
LazyList<Item> list;
// First build the list to be displayed with loose search.
if (_newItemEdit != null) {
constraint = _newItemEdit.getEditableText().toString().trim();
if (constraint != null && !constraint.isEmpty())
builder.where(ItemDao.Properties.Name.like('%' + constraint + '%'));
}
list = builder.orderAsc(ItemDao.Properties.Name).listLazy();
// Then check exact equality if necessary. Eventually make a new search.
if (constraint != null && !constraint.isEmpty()) {
if (list.isEmpty())
doShow = true;
if (list.size() == 1)
doShow = !list.get(0).getName().equals(constraint);
else if (list.size() > 1) {
builder = getSession().getItemDao().queryBuilder();
doShow = builder.where(ItemDao.Properties.Name.eq(constraint))
.buildCount().count() == 0;
}
}
if (_newItemButton != null) {
int visibility = _newItemButton.getVisibility();
// Only call setVisibility when necessary.
if (visibility == View.GONE && doShow)
_newItemButton.setVisibility(View.VISIBLE);
else if (visibility == View.VISIBLE && !doShow)
_newItemButton.setVisibility(View.GONE);
}
return list;
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:39,代码来源:EditFragment.java
示例9: queryBuilderLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public static LazyList queryBuilderLazyList(AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
return getQueryBuilder(dao, cond, condmore).listLazy();
}
开发者ID:DroidKOF,项目名称:pineapple,代码行数:4,代码来源:GreenDaoUtils.java
示例10: getACForumLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public static LazyList<ACForumRaw> getACForumLazyList() {
return sDaoSession.getACForumDao().queryBuilder().orderAsc(ACForumDao.Properties.Priority).listLazy();
}
开发者ID:seven332,项目名称:Nimingban,代码行数:4,代码来源:DB.java
示例11: getDraftLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public static LazyList<DraftRaw> getDraftLazyList() {
return sDaoSession.getDraftDao().queryBuilder().orderDesc(DraftDao.Properties.Time).listLazy();
}
开发者ID:seven332,项目名称:Nimingban,代码行数:4,代码来源:DB.java
示例12: getACRecordLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public static LazyList<ACRecordRaw> getACRecordLazyList() {
return sDaoSession.getACRecordDao().queryBuilder().orderDesc(ACRecordDao.Properties.Time).listLazy();
}
开发者ID:seven332,项目名称:Nimingban,代码行数:4,代码来源:DB.java
示例13: LazyListAdapter
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public LazyListAdapter(Context context, LazyList<T> lazyList) {
this.lazyList = lazyList;
this.dataValid = lazyList != null;
this.context = context;
}
开发者ID:sne11ius,项目名称:GeoTracker,代码行数:6,代码来源:LazyListAdapter.java
示例14: getHistoryLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public static synchronized LazyList<HistoryInfo> getHistoryLazyList() {
return sDaoSession.getHistoryDao().queryBuilder().orderDesc(HistoryDao.Properties.Time).listLazy();
}
开发者ID:seven332,项目名称:EhViewer,代码行数:4,代码来源:EhDB.java
示例15: AbstractLazyListAdapter
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public AbstractLazyListAdapter(Context context, LazyList<T> lazyList, int textSize) {
this._lazyList = lazyList;
this._context = context;
_textSize = textSize;
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:6,代码来源:AbstractLazyListAdapter.java
示例16: getLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public LazyList<T> getLazyList() {
return _lazyList;
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:4,代码来源:AbstractLazyListAdapter.java
示例17: ItemLazyListAdapter
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
public ItemLazyListAdapter(Context context, LazyList<Item> lazyList, int textSize) {
super (context, lazyList, textSize);
}
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:4,代码来源:ItemLazyListAdapter.java
示例18: getLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
/**
* Returns the list.
*
* @return the list.
*/
public LazyList<T> getLazyList() {
return lazyList;
}
开发者ID:sne11ius,项目名称:GeoTracker,代码行数:9,代码来源:LazyListAdapter.java
示例19: queryBuilderLazyList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
/**
* Executes the query and returns the result as a list that lazy loads the entities on first access. Entities are cached, so accessing the same entity more than once will not result in loading an entity from the underlying cursor again.Make sure to close it to close the underlying cursor.
* @param dao
* @param cond
* @param condmore
* @return
*/
public static LazyList queryBuilderLazyList(AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
return getQueryBuilder(dao, cond, condmore).listLazy();
}
开发者ID:cymcsg,项目名称:UltimateAndroid,代码行数:11,代码来源:GreenDaoUtils.java
示例20: createList
import de.greenrobot.dao.query.LazyList; //导入依赖的package包/类
protected abstract LazyList<Item> createList(Context context);
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:2,代码来源:AbstractListFragment.java
注:本文中的de.greenrobot.dao.query.LazyList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论