List of utility methods to do SQL Type
String | getDoubleTypeString(Connection conn) get Double Type String if (isSQLServer(conn)) return "FLOAT"; return "DOUBLE PRECISION"; |
String[] | getExpressionChoices(int type) get Expression Choices String[] choices = new String[] { "none", "sum", "average", "min", "max", "item-count", "group-count" }; if (type == Types.VARCHAR) { choices = new String[] { "none", "item-count", "group-count" }; } else if (type == Types.DATE || type == Types.TIME || type == Types.TIMESTAMP) { choices = new String[] { "none", "item-count", "group-count" }; return choices; |
String | getFormatTypeAsString(int fieldType) Get the String representing the format-type associated with the value in fieldType. switch (fieldType) { case Types.DATE: return "date"; case Types.NUMERIC: return "number"; case Types.VARCHAR: return null; default: ... |
String | getInsertarEmpresa() get Insertar Empresa return "INSERT INTO tblempresa( id_empresa, nombre, logo, estado) values (?,?,?,?)"; |
String | getIntTypeString(Connection conn) get Int Type String return "INT"; |
Integer | getIntValue(String typeName) Returns an int value for the specified type name from Types or any other class containing SQL type constants, for example oracle.jdbc.OracleTypes . Integer ret = (Integer) encoder.get(typeName); if (ret == null) { ret = extractConstant(typeName); encoder.put(typeName, ret); return ret; |
String | getJavaType(int dataType, int columnSize, int decimalDegit) get Java Type String fieldType = String.class.getName(); switch (dataType) { case Types.ARRAY: break; case Types.BIGINT: fieldType = "long"; break; case Types.BINARY: ... |
String | getJavaType(int jdbcType) get Java Type switch (jdbcType) { case Types.BIT: return Boolean.class.getName(); case Types.TINYINT: return Byte.class.getName(); case Types.SMALLINT: return Short.class.getName(); case Types.CHAR: ... |
Class | getJavaType(int sqlType) get Java Type switch (sqlType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: return String.class; case Types.BINARY: case Types.VARBINARY: ... |
Integer | getJavaType(String rdbType) rdb type to java Integer javaType = mapTypes.get(rdbType); if (javaType == null) { return java.sql.Types.VARCHAR; return javaType; |