当前位置: 首页>>代码示例>>Java>>正文


Java DbException.printStackTrace方法代码示例

本文整理汇总了Java中org.xutils.ex.DbException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java DbException.printStackTrace方法的具体用法?Java DbException.printStackTrace怎么用?Java DbException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.xutils.ex.DbException的用法示例。


在下文中一共展示了DbException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: add

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void add(Comic comic) {
    try {
        if (comic.isMark() || comic.isDownload()) {
            if (comic.getChapterNameList() == null || "".equals(comic.getChapterNameList())) {
                comic.saveChapterNameList();
            }
            if (comic.getChapterIdList() == null || "".equals(comic.getChapterIdList())) {
                comic.saveChapterIdList();
            }
        }
        if (comic.isUpdate()) {
            comic.saveChapterNameList();
            comic.saveChapterIdList();
        }
        sDb.save(comic);
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:20,代码来源:ComicDBHelper.java

示例2: findByChapterUrl

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public List<ThreadInfo> findByChapterUrl(long chid) {
    List<ThreadInfo> threadInfos = new ArrayList<>();
    ThreadInfo threadInfo;
    try {
        List<DbModel> dbModels = sDb.findDbModelAll(new SqlInfo("select * from thread_info where chid = " +
                "'" + chid + "'"));
        for (DbModel dbModel : dbModels) {
            threadInfo = new ThreadInfo();
            threadInfo.setId(dbModel.getInt("id"));
            threadInfo.setThreadPosition(dbModel.getInt("thread_position"));
            threadInfo.setThreadCount(dbModel.getInt("thread_count"));
            threadInfo.setDownloadPosition(dbModel.getInt("download_position"));
            threadInfo.setLength(dbModel.getInt("length"));
            threadInfo.setFinished(dbModel.getInt("finished"));
            threadInfo.setChid(dbModel.getLong("chid"));
            threadInfos.add(threadInfo);
        }
    } catch (DbException e) {
        e.printStackTrace();
        return null;
    }
    return threadInfos;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:24,代码来源:DownloadThreadDBHelper.java

示例3: initVariables

import org.xutils.ex.DbException; //导入方法依赖的package包/类
@Override
protected void initVariables() {
    maxNumber = 10;
    blacklists = new ArrayList<>();
    try {
        maxCount = DbUtils.getInstance().selector(Blacklist.class).count();
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:ting4937,项目名称:AndroidUtils,代码行数:11,代码来源:CommuGuardActivity.java

示例4: updateProgress

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void updateProgress(ComicChapter comicChapter) {
    try {
        sDb.update(comicChapter, "download_position");
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:8,代码来源:ComicChapterDBHelper.java

示例5: onFinish

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public void onFinish (Photo photo) {
    Log.v (TAG, "onFinish photo.id=" + photo.id);
    PhotoEntity entity = new PhotoEntity(photo);
    entity.state = PhotoEntity.STATE_FINISHED;
    try {
        mDb.saveOrUpdate(entity);
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:boybeak,项目名称:DelegateAdapter,代码行数:11,代码来源:PhotoManager.java

示例6: findByComicCid

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public List<ComicChapter> findByComicCid(int cid) {
    List<ComicChapter> comicChapters = null;
    try {
        comicChapters = sDb.selector(ComicChapter.class).where("cid", "=", cid).findAll();
        if (comicChapters != null) {
            Collections.sort(comicChapters);
        }
    } catch (DbException e) {
        e.printStackTrace();
    }
    return comicChapters;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:13,代码来源:ComicChapterDBHelper.java

示例7: findMarkedComics

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public List<Comic> findMarkedComics() {
    List<Comic> markedComics = null;
    try {
        markedComics = sDb.selector(Comic.class).where("is_mark", "=", true).orderBy("last_read_time", true).findAll();
    } catch (DbException e) {
        e.printStackTrace();
    }
    return markedComics;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:10,代码来源:ComicDBHelper.java

示例8: findDownloadedComics

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public List<Comic> findDownloadedComics() {
    List<Comic> downloadedComics = null;
    try {
        downloadedComics = sDb.selector(Comic.class).where("is_download", "=", true).findAll();
    } catch (DbException e) {
        e.printStackTrace();
    }
    return downloadedComics;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:10,代码来源:ComicDBHelper.java

示例9: findAll

import org.xutils.ex.DbException; //导入方法依赖的package包/类
@Deprecated
public List<ComicChapter> findAll() {
    List<ComicChapter> comicChapters = new ArrayList<>();
    try {
        comicChapters = sDb.findAll(ComicChapter.class);
    } catch (DbException e) {
        e.printStackTrace();
    }
    return comicChapters;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:11,代码来源:ComicChapterDBHelper.java

示例10: findByCidInTable

import org.xutils.ex.DbException; //导入方法依赖的package包/类
private Comic findByCidInTable(int cid) {
    Comic comic = null;
    try {
        comic = sDb.selector(Comic.class).where("cid", "=", cid).findFirst();
    } catch (DbException e) {
        e.printStackTrace();
    }
    return comic;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:10,代码来源:ComicDBHelper.java

示例11: findAll

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public List<Comic> findAll() {
    List<Comic> comics = null;
    try {
        comics = sDb.selector(Comic.class).orderBy("last_read_time", true).limit(100).findAll();
    } catch (DbException e) {
        e.printStackTrace();
    }
    return comics;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:10,代码来源:ComicDBHelper.java

示例12: add

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void add(ThreadInfo threadInfo) {
    try {
        sDb.save(threadInfo);
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:8,代码来源:DownloadThreadDBHelper.java

示例13: update

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void update(ThreadInfo threadInfo) {
    try {
        sDb.update(threadInfo);
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:8,代码来源:DownloadThreadDBHelper.java

示例14: deleteAllChapterThread

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void deleteAllChapterThread(long chid) {
    WhereBuilder builder = WhereBuilder.b("chid", "=", chid);
    try {
        sDb.delete(ThreadInfo.class, builder);
    } catch (DbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:9,代码来源:DownloadThreadDBHelper.java

示例15: findAll

import org.xutils.ex.DbException; //导入方法依赖的package包/类
public List<ThreadInfo> findAll() {
    List<ThreadInfo> threadInfos = new ArrayList<>();
    try {
        sDb.findAll(ThreadInfo.class);
    } catch (DbException e) {
        e.printStackTrace();
        return null;
    }
    return threadInfos;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:11,代码来源:DownloadThreadDBHelper.java


注:本文中的org.xutils.ex.DbException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。