|
|
|
|
|
|
<!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"> package cn.edu.ecnu.stu.bookstore.handler;
|
|
|
|
import cn.edu.ecnu.stu.bookstore.pojo.OrderStatus;
|
|
import org.apache.ibatis.type.JdbcType;
|
|
import org.apache.ibatis.type.TypeHandler;
|
|
|
|
import java.sql.CallableStatement;
|
|
import java.sql.PreparedStatement;
|
|
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
|
|
<b class="fc"> public class OrderStatusTypeHandler implements TypeHandler<OrderStatus> {</b>
|
|
@Override
|
|
public void setParameter(PreparedStatement preparedStatement, int i, OrderStatus status, JdbcType jdbcType) throws SQLException {
|
|
<b class="nc"> preparedStatement.setInt(i, status.getValue());</b>
|
|
}
|
|
|
|
@Override
|
|
public OrderStatus getResult(ResultSet resultSet, String s) throws SQLException {
|
|
<b class="fc"> return OrderStatus.getByValue(resultSet.getInt(s));</b>
|
|
}
|
|
|
|
@Override
|
|
public OrderStatus getResult(ResultSet resultSet, int i) throws SQLException {
|
|
<b class="nc"> return OrderStatus.getByValue(resultSet.getInt(i));</b>
|
|
}
|
|
|
|
@Override
|
|
public OrderStatus getResult(CallableStatement callableStatement, int i) throws SQLException {
|
|
<b class="nc"> return OrderStatus.getByValue(callableStatement.getInt(i));</b>
|
|
}
|
|
}
|
|
</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>
|