数据库第二次大作业boostore
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

135 rindas
3.2 KiB

pirms 11 mēnešiem
  1. <!DOCTYPE html>
  2. <html id="htmlId">
  3. <head>
  4. <title>Coverage Report > OrderStatusTypeHandler</title>
  5. <style type="text/css">
  6. @import "../../css/coverage.css";
  7. @import "../../css/idea.min.css";
  8. </style>
  9. <script type="text/javascript" src="../../js/highlight.min.js"></script>
  10. <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
  11. </head>
  12. <body>
  13. <div class="content">
  14. <div class="breadCrumbs">
  15. Current scope: <a href="../../index.html">all classes</a>
  16. <span class="separator">|</span>
  17. <a href="../index.html">cn.edu.ecnu.stu.bookstore.handler</a>
  18. </div>
  19. <h1>Coverage Summary for Class: OrderStatusTypeHandler (cn.edu.ecnu.stu.bookstore.handler)</h1>
  20. <table class="coverageStats">
  21. <tr>
  22. <th class="name">Class</th>
  23. <th class="coverageStat
  24. ">
  25. Class, %
  26. </th>
  27. <th class="coverageStat
  28. ">
  29. Method, %
  30. </th>
  31. <th class="coverageStat
  32. ">
  33. Line, %
  34. </th>
  35. </tr>
  36. <tr>
  37. <td class="name">OrderStatusTypeHandler</td>
  38. <td class="coverageStat">
  39. <span class="percent">
  40. 100%
  41. </span>
  42. <span class="absValue">
  43. (1/1)
  44. </span>
  45. </td>
  46. <td class="coverageStat">
  47. <span class="percent">
  48. 40%
  49. </span>
  50. <span class="absValue">
  51. (2/5)
  52. </span>
  53. </td>
  54. <td class="coverageStat">
  55. <span class="percent">
  56. 40%
  57. </span>
  58. <span class="absValue">
  59. (2/5)
  60. </span>
  61. </td>
  62. </tr>
  63. </table>
  64. <br/>
  65. <br/>
  66. <pre>
  67. <code class="sourceCode" id="sourceCode">&nbsp;package cn.edu.ecnu.stu.bookstore.handler;
  68. &nbsp;
  69. &nbsp;import cn.edu.ecnu.stu.bookstore.pojo.OrderStatus;
  70. &nbsp;import org.apache.ibatis.type.JdbcType;
  71. &nbsp;import org.apache.ibatis.type.TypeHandler;
  72. &nbsp;
  73. &nbsp;import java.sql.CallableStatement;
  74. &nbsp;import java.sql.PreparedStatement;
  75. &nbsp;import java.sql.ResultSet;
  76. &nbsp;import java.sql.SQLException;
  77. &nbsp;
  78. <b class="fc">&nbsp;public class OrderStatusTypeHandler implements TypeHandler&lt;OrderStatus&gt; {</b>
  79. &nbsp; @Override
  80. &nbsp; public void setParameter(PreparedStatement preparedStatement, int i, OrderStatus status, JdbcType jdbcType) throws SQLException {
  81. <b class="nc">&nbsp; preparedStatement.setInt(i, status.getValue());</b>
  82. &nbsp; }
  83. &nbsp;
  84. &nbsp; @Override
  85. &nbsp; public OrderStatus getResult(ResultSet resultSet, String s) throws SQLException {
  86. <b class="fc">&nbsp; return OrderStatus.getByValue(resultSet.getInt(s));</b>
  87. &nbsp; }
  88. &nbsp;
  89. &nbsp; @Override
  90. &nbsp; public OrderStatus getResult(ResultSet resultSet, int i) throws SQLException {
  91. <b class="nc">&nbsp; return OrderStatus.getByValue(resultSet.getInt(i));</b>
  92. &nbsp; }
  93. &nbsp;
  94. &nbsp; @Override
  95. &nbsp; public OrderStatus getResult(CallableStatement callableStatement, int i) throws SQLException {
  96. <b class="nc">&nbsp; return OrderStatus.getByValue(callableStatement.getInt(i));</b>
  97. &nbsp; }
  98. &nbsp;}
  99. </code>
  100. </pre>
  101. </div>
  102. <script type="text/javascript">
  103. (function() {
  104. var msie = false, msie9 = false;
  105. /*@cc_on
  106. msie = true;
  107. @if (@_jscript_version >= 9)
  108. msie9 = true;
  109. @end
  110. @*/
  111. if (!msie || msie && msie9) {
  112. hljs.highlightAll()
  113. hljs.initLineNumbersOnLoad();
  114. }
  115. })();
  116. </script>
  117. <div class="footer">
  118. <div style="float:right;">generated on 2023-12-12 18:32</div>
  119. </div>
  120. </body>
  121. </html>