数据库第二次大作业boostore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

135 lines
3.2 KiB

<!DOCTYPE html>
<html id="htmlId">
<head>
<title>Coverage Report > OrderStatusTypeHandler</title>
<style type="text/css">
@import "../../css/coverage.css";
@import "../../css/idea.min.css";
</style>
<script type="text/javascript" src="../../js/highlight.min.js"></script>
<script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>
<body>
<div class="content">
<div class="breadCrumbs">
Current scope: <a href="../../index.html">all classes</a>
<span class="separator">|</span>
<a href="../index.html">cn.edu.ecnu.stu.bookstore.handler</a>
</div>
<h1>Coverage Summary for Class: OrderStatusTypeHandler (cn.edu.ecnu.stu.bookstore.handler)</h1>
<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">OrderStatusTypeHandler</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
40%
</span>
<span class="absValue">
(2/5)
</span>
</td>
<td class="coverageStat">
<span class="percent">
40%
</span>
<span class="absValue">
(2/5)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package cn.edu.ecnu.stu.bookstore.handler;
&nbsp;
&nbsp;import cn.edu.ecnu.stu.bookstore.pojo.OrderStatus;
&nbsp;import org.apache.ibatis.type.JdbcType;
&nbsp;import org.apache.ibatis.type.TypeHandler;
&nbsp;
&nbsp;import java.sql.CallableStatement;
&nbsp;import java.sql.PreparedStatement;
&nbsp;import java.sql.ResultSet;
&nbsp;import java.sql.SQLException;
&nbsp;
<b class="fc">&nbsp;public class OrderStatusTypeHandler implements TypeHandler&lt;OrderStatus&gt; {</b>
&nbsp; @Override
&nbsp; public void setParameter(PreparedStatement preparedStatement, int i, OrderStatus status, JdbcType jdbcType) throws SQLException {
<b class="nc">&nbsp; preparedStatement.setInt(i, status.getValue());</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public OrderStatus getResult(ResultSet resultSet, String s) throws SQLException {
<b class="fc">&nbsp; return OrderStatus.getByValue(resultSet.getInt(s));</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public OrderStatus getResult(ResultSet resultSet, int i) throws SQLException {
<b class="nc">&nbsp; return OrderStatus.getByValue(resultSet.getInt(i));</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public OrderStatus getResult(CallableStatement callableStatement, int i) throws SQLException {
<b class="nc">&nbsp; return OrderStatus.getByValue(callableStatement.getInt(i));</b>
&nbsp; }
&nbsp;}
</code>
</pre>
</div>
<script type="text/javascript">
(function() {
var msie = false, msie9 = false;
/*@cc_on
msie = true;
@if (@_jscript_version >= 9)
msie9 = true;
@end
@*/
if (!msie || msie && msie9) {
hljs.highlightAll()
hljs.initLineNumbersOnLoad();
}
})();
</script>
<div class="footer">
<div style="float:right;">generated on 2023-12-12 18:32</div>
</div>
</body>
</html>