Package com.mysema.query.sql

Examples of com.mysema.query.sql.JDBCTypeMapping


        Map<Integer, String> types = new HashMap<Integer, String>();
        for (Field field : java.sql.Types.class.getFields()) {
            types.put((Integer)field.get(null), field.getName());
        }
       
        JDBCTypeMapping jdbcTypeMapping = new JDBCTypeMapping();
       
        DatabaseMetaData metadata = Connections.getConnection().getMetaData();
        ResultSet rs = metadata.getColumns(null, null, "type_tests", null);
        try {
            while (rs.next()) {
                System.out.println(rs.getString("COLUMN_NAME"));
                System.out.println(types.get(rs.getInt("DATA_TYPE")));
                System.out.println(rs.getInt("COLUMN_SIZE"));
                System.out.println(rs.getInt("DECIMAL_DIGITS"));
                System.out.println(jdbcTypeMapping.get(
                        rs.getInt("DATA_TYPE"),
                        rs.getInt("COLUMN_SIZE"),
                        rs.getInt("DECIMAL_DIGITS")));
                System.out.println();
            }
View Full Code Here

TOP

Related Classes of com.mysema.query.sql.JDBCTypeMapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.