com.j256.ormlite.dao.Dao.mapSelectStarRow()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中com.j256.ormlite.dao.Dao.mapSelectStarRow()方法的一些代码示例,展示了Dao.mapSelectStarRow()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dao.mapSelectStarRow()方法的具体详情如下:
包路径:com.j256.ormlite.dao.Dao
类名称:Dao
方法名:mapSelectStarRow

Dao.mapSelectStarRow介绍

[英]Return the latest row from the database results from a query to select * (star).
[中]从数据库中返回查询结果中的最新行,以选择*(星形)。

代码示例

代码示例来源:origin: j256/ormlite-core

  1. /**
  2. * @see Dao#mapSelectStarRow(DatabaseResults)
  3. */
  4. @Override
  5. public T mapSelectStarRow(DatabaseResults results) {
  6. try {
  7. return dao.mapSelectStarRow(results);
  8. } catch (SQLException e) {
  9. logMessage(e, "mapSelectStarRow threw exception on results");
  10. throw new RuntimeException(e);
  11. }
  12. }

代码示例来源:origin: com.j256.ormlite/ormlite-core

  1. /**
  2. * @see Dao#mapSelectStarRow(DatabaseResults)
  3. */
  4. @Override
  5. public T mapSelectStarRow(DatabaseResults results) {
  6. try {
  7. return dao.mapSelectStarRow(results);
  8. } catch (SQLException e) {
  9. logMessage(e, "mapSelectStarRow threw exception on results");
  10. throw new RuntimeException(e);
  11. }
  12. }

代码示例来源:origin: j256/ormlite-core

  1. @Test(expected = RuntimeException.class)
  2. public void testMapSelectStarRowThrow() throws Exception {
  3. @SuppressWarnings("unchecked")
  4. Dao<Foo, String> dao = (Dao<Foo, String>) createMock(Dao.class);
  5. RuntimeExceptionDao<Foo, String> rtDao = new RuntimeExceptionDao<Foo, String>(dao);
  6. DatabaseResults results = createMock(DatabaseResults.class);
  7. expect(dao.mapSelectStarRow(results)).andThrow(new SQLException("Testing catch"));
  8. replay(dao);
  9. rtDao.mapSelectStarRow(results);
  10. verify(dao);
  11. }

代码示例来源:origin: j256/ormlite-core

  1. DatabaseResults results = iterator.getRawResults();
  2. for (int count = 0; results.next(); count++) {
  3. Foo foo = dao.mapSelectStarRow(results);
  4. switch (count) {
  5. case 0 :

相关文章