@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)); }
@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 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 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(); }
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); }
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);  }