本文整理汇总了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();
}
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例12: add
import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void add(ThreadInfo threadInfo) {
try {
sDb.save(threadInfo);
} catch (DbException e) {
e.printStackTrace();
}
}
示例13: update
import org.xutils.ex.DbException; //导入方法依赖的package包/类
public synchronized void update(ThreadInfo threadInfo) {
try {
sDb.update(threadInfo);
} catch (DbException e) {
e.printStackTrace();
}
}
示例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();
}
}
示例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;
}