-
Notifications
You must be signed in to change notification settings - Fork 12.9k
/
Copy pathNull.java.html
105 lines (78 loc) · 5.39 KB
/
Null.java.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang=""><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Null.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">mybatis</a> > <a href="index.source.html" class="el_package">org.apache.ibatis.jdbc</a> > <span class="el_source">Null.java</span></div><h1>Null.java</h1><pre class="source lang-java linenums">/*
* Copyright 2009-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.jdbc;
import org.apache.ibatis.type.BigDecimalTypeHandler;
import org.apache.ibatis.type.BlobTypeHandler;
import org.apache.ibatis.type.BooleanTypeHandler;
import org.apache.ibatis.type.ByteArrayTypeHandler;
import org.apache.ibatis.type.ByteTypeHandler;
import org.apache.ibatis.type.ClobTypeHandler;
import org.apache.ibatis.type.DateOnlyTypeHandler;
import org.apache.ibatis.type.DateTypeHandler;
import org.apache.ibatis.type.DoubleTypeHandler;
import org.apache.ibatis.type.FloatTypeHandler;
import org.apache.ibatis.type.IntegerTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.LongTypeHandler;
import org.apache.ibatis.type.ObjectTypeHandler;
import org.apache.ibatis.type.ShortTypeHandler;
import org.apache.ibatis.type.SqlDateTypeHandler;
import org.apache.ibatis.type.SqlTimeTypeHandler;
import org.apache.ibatis.type.SqlTimestampTypeHandler;
import org.apache.ibatis.type.StringTypeHandler;
import org.apache.ibatis.type.TimeOnlyTypeHandler;
import org.apache.ibatis.type.TypeHandler;
/**
* @author Clinton Begin
* @author Adam Gent
*/
<span class="fc" id="L44">public enum Null {</span>
<span class="fc" id="L45"> BOOLEAN(new BooleanTypeHandler(), JdbcType.BOOLEAN),</span>
<span class="fc" id="L47"> BYTE(new ByteTypeHandler(), JdbcType.TINYINT),</span>
<span class="fc" id="L49"> SHORT(new ShortTypeHandler(), JdbcType.SMALLINT),</span>
<span class="fc" id="L51"> INTEGER(new IntegerTypeHandler(), JdbcType.INTEGER),</span>
<span class="fc" id="L53"> LONG(new LongTypeHandler(), JdbcType.BIGINT),</span>
<span class="fc" id="L55"> FLOAT(new FloatTypeHandler(), JdbcType.FLOAT),</span>
<span class="fc" id="L57"> DOUBLE(new DoubleTypeHandler(), JdbcType.DOUBLE),</span>
<span class="fc" id="L59"> BIGDECIMAL(new BigDecimalTypeHandler(), JdbcType.DECIMAL),</span>
<span class="fc" id="L61"> STRING(new StringTypeHandler(), JdbcType.VARCHAR),</span>
<span class="fc" id="L63"> CLOB(new ClobTypeHandler(), JdbcType.CLOB),</span>
<span class="fc" id="L65"> LONGVARCHAR(new ClobTypeHandler(), JdbcType.LONGVARCHAR),</span>
<span class="fc" id="L67"> BYTEARRAY(new ByteArrayTypeHandler(), JdbcType.LONGVARBINARY),</span>
<span class="fc" id="L69"> BLOB(new BlobTypeHandler(), JdbcType.BLOB),</span>
<span class="fc" id="L71"> LONGVARBINARY(new BlobTypeHandler(), JdbcType.LONGVARBINARY),</span>
<span class="fc" id="L73"> OBJECT(new ObjectTypeHandler(), JdbcType.OTHER),</span>
<span class="fc" id="L75"> OTHER(new ObjectTypeHandler(), JdbcType.OTHER),</span>
<span class="fc" id="L77"> TIMESTAMP(new DateTypeHandler(), JdbcType.TIMESTAMP),</span>
<span class="fc" id="L79"> DATE(new DateOnlyTypeHandler(), JdbcType.DATE),</span>
<span class="fc" id="L81"> TIME(new TimeOnlyTypeHandler(), JdbcType.TIME),</span>
<span class="fc" id="L83"> SQLTIMESTAMP(new SqlTimestampTypeHandler(), JdbcType.TIMESTAMP),</span>
<span class="fc" id="L85"> SQLDATE(new SqlDateTypeHandler(), JdbcType.DATE),</span>
<span class="fc" id="L87"> SQLTIME(new SqlTimeTypeHandler(), JdbcType.TIME);</span>
private final TypeHandler<?> typeHandler;
private final JdbcType jdbcType;
<span class="fc" id="L92"> Null(TypeHandler<?> typeHandler, JdbcType jdbcType) {</span>
<span class="fc" id="L93"> this.typeHandler = typeHandler;</span>
<span class="fc" id="L94"> this.jdbcType = jdbcType;</span>
<span class="fc" id="L95"> }</span>
public TypeHandler<?> getTypeHandler() {
<span class="fc" id="L98"> return typeHandler;</span>
}
public JdbcType getJdbcType() {
<span class="fc" id="L102"> return jdbcType;</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>