### Question:
OracleGenDialect extends StandardGenDialect { @Override public ColumnType getColumnType(String typeName, int sqlType) { if (useOracleDate && StringUtil.equalsIgnoreCase(typeName, "date")) { return OracleColumnType.DATE; } ColumnType columnType = columnTypeMap.get(typeName); if (columnType != null) { return columnType; } if (StringUtil.startsWithIgnoreCase(typeName, "timestamp")) { typeName = "timestamp"; } return super.getColumnType(typeName, sqlType); } OracleGenDialect(); boolean isUseOracleDate(); void setUseOracleDate(boolean useOracleDate); @Override String getName(); @Override GenerationType getDefaultGenerationType(); @Override boolean supportsSequence(); @Override boolean supportsGetIndexInfo(String catalogName, String schemaName,
            String tableName); @Override String getSequenceDefinitionFragment(String dataType,
            long initialValue, int allocationSize); @Override String getSqlBlockDelimiter(); @Override boolean isTableNotFound(Throwable throwable); @Override boolean isColumnNotFound(Throwable throwable); @Override boolean isSequenceNotFound(Throwable throwable); @Override ColumnType getColumnType(String typeName, int sqlType); @Override SqlBlockContext createSqlBlockContext(); @Override String getSequenceNextValString(String sequenceName,
            int allocationSize); @Override boolean supportsCommentInCreateTable(); @Override boolean supportsCommentOn(); @Override boolean isJdbcCommentAvailable(); @Override String getTableComment(Connection connection, String catalogName,
            String schemaName, String tableName); @Override Map<String, String> getColumnCommentMap(Connection connection,
            String catalogName, String schemaName, String tableName); @Override boolean supportsReferentialUpdateRule(); @Override SqlType getSqlType(ValueTypeProvider valueTypeProvider,
            PropertyMeta propertyMeta);  }### Answer:
@Test public void testGetColumnType_number() throws Exception { ColumnType type = dialect.getColumnType("NUMBER", Types.OTHER); assertEquals("number(10,5)", type.getColumnDefinition(0, 10, 5, null)); assertEquals(Integer.class, type.getAttributeClass(0, 9, 0)); assertEquals(BigDecimal.class, type.getAttributeClass(0, 9, 2)); assertEquals(Long.class, type.getAttributeClass(0, 10, 0)); }
@Test public void testGetColumnType_varchar2() throws Exception { ColumnType type = dialect.getColumnType("varchar2", Types.OTHER); assertEquals("varchar2(10)", type.getColumnDefinition(10, 0, 0, null)); assertEquals(String.class, type.getAttributeClass(10, 0, 0)); }
@Test public void testGetColumnType_timestamp() throws Exception { ColumnType type = dialect.getColumnType("timestamp(", Types.OTHER); assertEquals("timestamp(5)", type.getColumnDefinition(0, 0, 5, null)); assertEquals(Timestamp.class, type.getAttributeClass(0, 0, 5)); }
@Test public void testGetColumnType_oracleDate() throws Exception { ColumnType type = dialect.getColumnType("date", Types.OTHER); assertEquals("date", type.getColumnDefinition(0, 0, 0, null)); assertEquals(Timestamp.class, type.getAttributeClass(0, 0, 0)); assertEquals(TemporalType.TIMESTAMP, type.getTemporalType()); }