Jquery中文网 www.jquerycn.cn
Jquery中文网 >  脚本编程  >  java  >  正文 一个自动生成Hibernate ORM映射文件的工具函数

一个自动生成Hibernate ORM映射文件的工具函数

发布时间:2018-10-13   编辑:www.jquerycn.cn
jquery中文网为您提供一个自动生成Hibernate ORM映射文件的工具函数等资源,欢迎您收藏本站,我们将为您提供最新的一个自动生成Hibernate ORM映射文件的工具函数资源
没啥,前几天有人问我如何生成Hibernate的映射文件,我随口说,就那点儿东西,自己随便写个函数不就得了,谁知对方这伙计有够懒,直接就开口说兄弟帮忙了,无奈之下随手应付了一个



<span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.io.FileWriter;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.sql.Connection;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.sql.DriverManager;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.sql.ResultSet;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.sql.ResultSetMetaData;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.sql.Statement;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.sql.Types;
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.util.Date;

</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> ConfigGenerator
</span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_251_5957_Closed_Text">...</span><span id="_251_5957_Open_Text"><span style="color: rgb(0, 0, 0);">{

    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[] args) </span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);"> Exception
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_312_4049_Closed_Text">...</span><span id="_312_4049_Open_Text"><span style="color: rgb(0, 0, 0);">{
        String table_name </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">user_list</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;
        String root_path </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">C:/</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;
        String pkgName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">lld.test.hibernate</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;
        Class.forName(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">com.microsoft.jdbc.sqlserver.SQLServerDriver</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        DriverManager.registerDriver(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> com.microsoft.jdbc.sqlserver.SQLServerDriver());
        Connection conn </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> DriverManager.getConnection(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">, </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">sa</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">, </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">sa</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">connected to database successfully.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        Statement st </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> conn.createStatement();
        String sql </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">select * from </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> table_name </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> where 1 = 2</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;
        ResultSet rs </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> st.executeQuery(sql);
        ResultSetMetaData meta </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> rs.getMetaData();
        String hbmFile </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getHbmFile(root_path, table_name);
        String beanFile </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getBeanFile(root_path, table_name);
        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">output hbm file: </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> hbmFile);
        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">output bean file: </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> beanFile);
        
        String beanName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getBeanName(table_name);
        FileWriter outHbm </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> FileWriter(hbmFile);
        FileWriter outBean </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> FileWriter(beanFile);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><?xml version="1.0" encoding="UTF-8"?></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><!DOCTYPE hibernate-mapping PUBLIC</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><hibernate-mapping></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    <class name="</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> pkgName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> beanName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">" table="</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> table_name </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">"></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">package </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> pkgName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">public class </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> beanName);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">{</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        
        StringBuffer toStr </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> StringBuffer();
        
        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> iCol </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">; iCol </span><span style="color: rgb(0, 0, 0);"><=</span><span style="color: rgb(0, 0, 0);"> meta.getColumnCount(); iCol</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">)
        </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_2176_3436_Closed_Text">...</span><span id="_2176_3436_Open_Text"><span style="color: rgb(0, 0, 0);">{
            String colName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> meta.getColumnName(iCol);
            </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> colType </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> meta.getColumnType(iCol);
            String propName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getPropertyName(colName);
            String javaType </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getJavaType(colType).getName();
            outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">        <property name="</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">" column="</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> colName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">"/></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    private </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> javaType </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    public </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> javaType </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> getGetterMethod(propName) </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">()</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> {</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">        return this.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> }</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);

            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    public void </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> getSetterMethod(propName) </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> javaType </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> {</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">        this.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> = </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> }</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            
            toStr.append(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> = "   this.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> propName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">   "rn" </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(iCol </span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);"> meta.getColumnCount())
            </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_3390_3427_Closed_Text">...</span><span id="_3390_3427_Open_Text"><span style="color: rgb(0, 0, 0);">{
                toStr.append(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">                </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
            }</span></span><span style="color: rgb(0, 0, 0);">
                
        }</span></span><span style="color: rgb(0, 0, 0);">

        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    </class></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"></hibernate-mapping></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outHbm.flush();
        outHbm.close();
        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">hbm file generated sucessfully!</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);

        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    @Override</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    public String toString()</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">    {</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">        return </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> toStr.toString() </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> }</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">}</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        outBean.flush();
        outBean.close();
        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">bean file generated sucessfully!</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
    }</span></span><span style="color: rgb(0, 0, 0);">
    
    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getHbmFile(String root_path, String table_name)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_4125_4174_Closed_Text">...</span><span id="_4125_4174_Open_Text"><span style="color: rgb(0, 0, 0);">{
        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> root_path </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> table_name </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">.hbm.xml</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;
    }</span></span><span style="color: rgb(0, 0, 0);">
    
    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getBeanFile(String root_path, String table_name)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_4251_4340_Closed_Text">...</span><span id="_4251_4340_Open_Text"><span style="color: rgb(0, 0, 0);">{
        String beanName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getBeanName(table_name);
        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> root_path </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> beanName </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">.java</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;
    }</span></span><span style="color: rgb(0, 0, 0);">
    
    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getBeanName(String table_name)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_4399_4642_Closed_Text">...</span><span id="_4399_4642_Open_Text"><span style="color: rgb(0, 0, 0);">{
        String[] segs </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> table_name.split(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">_</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        String beanName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;
        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> segs.length; i</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">)
        </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_4507_4620_Closed_Text">...</span><span id="_4507_4620_Open_Text"><span style="color: rgb(0, 0, 0);">{
            beanName </span><span style="color: rgb(0, 0, 0);"> =</span><span style="color: rgb(0, 0, 0);"> segs[i].substring(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">, </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">).toUpperCase() </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> segs[i].substring(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">, segs[i].length()).toLowerCase();
        }</span></span><span style="color: rgb(0, 0, 0);">
        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> beanName;
    }</span></span><span style="color: rgb(0, 0, 0);">

    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getPropertyName(String col_name)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_4702_4991_Closed_Text">...</span><span id="_4702_4991_Open_Text"><span style="color: rgb(0, 0, 0);">{
        String[] segs </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> col_name.split(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">_</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);
        String propName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;
        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> segs.length; i</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">)
        </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_4808_4969_Closed_Text">...</span><span id="_4808_4969_Open_Text"><span style="color: rgb(0, 0, 0);">{
            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(i </span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)
                propName </span><span style="color: rgb(0, 0, 0);"> =</span><span style="color: rgb(0, 0, 0);"> segs[i];
            </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);">
                propName </span><span style="color: rgb(0, 0, 0);"> =</span><span style="color: rgb(0, 0, 0);"> segs[i].substring(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">, </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">).toUpperCase() </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> segs[i].substring(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">, segs[i].length()).toLowerCase();
        }</span></span><span style="color: rgb(0, 0, 0);">
        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> propName;
    }</span></span><span style="color: rgb(0, 0, 0);">

    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getGetterMethod(String prop_name)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_5052_5158_Closed_Text">...</span><span id="_5052_5158_Open_Text"><span style="color: rgb(0, 0, 0);">{
        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">get</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> prop_name.substring(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">, </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">).toUpperCase() </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> prop_name.substring(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">, prop_name.length());
    }</span></span><span style="color: rgb(0, 0, 0);">

    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getSetterMethod(String prop_name)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_5219_5325_Closed_Text">...</span><span id="_5219_5325_Open_Text"><span style="color: rgb(0, 0, 0);">{
        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">set</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> prop_name.substring(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">, </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">).toUpperCase() </span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"> prop_name.substring(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">, prop_name.length());
    }</span></span><span style="color: rgb(0, 0, 0);">
    
    @SuppressWarnings(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">unchecked</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)
    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> Class getJavaType(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> colType)
    </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_5409_5955_Closed_Text">...</span><span id="_5409_5955_Open_Text"><span style="color: rgb(0, 0, 0);">{
        </span><span style="color: rgb(0, 0, 255);">switch</span><span style="color: rgb(0, 0, 0);">(colType)
        </span><span style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;" id="_5431_5952_Closed_Text">...</span><span id="_5431_5952_Open_Text"><span style="color: rgb(0, 0, 0);">{
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.BIT:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.TINYINT:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.SMALLINT:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Short.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.INTEGER:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Integer.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.BIGINT:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Long.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.CHAR:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.VARCHAR:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.CLOB:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.LONGNVARCHAR:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> String.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.FLOAT:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Float.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.DOUBLE:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Double.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.DATE:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.TIME:
            </span><span style="color: rgb(0, 0, 255);">case</span><span style="color: rgb(0, 0, 0);"> Types.TIMESTAMP:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Date.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
            </span><span style="color: rgb(0, 0, 255);">default</span><span style="color: rgb(0, 0, 0);">:
                </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Object.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">;
        }</span></span><span style="color: rgb(0, 0, 0);">
    }</span></span><span style="color: rgb(0, 0, 0);">
}</span></span><span style="color: rgb(0, 0, 0);">
</span> 

[关闭]