By default, the data retrieved by an SQL statement maps to the following
Java classes:
SQL Type | Java class |
---|---|
CHAR | java.lang.String |
VARCHAR | java.lang.String |
LONG VARCHAR | java.lang.String |
INTEGER | java.lang.Integer |
TINYINT | java.lang.Integer |
SMALLINT | java.lang.Short |
DECIMAL | java.math.BigDecimal |
NUMERIC | java.math.BigDecimal |
BIT | java.math.Boolean |
BIGINT | java.lang.Long |
REAL | java.lang.Float |
FLOAT | java.lang.Double |
DOUBLE | java.lang.Double |
BINARY | java.lang.byte[] |
VARBINARY | java.lang.byte[] |
LONGVARBINARY | java.lang.byte[] |
DATE | java.sql.Date |
TIME | java.sql.Time |
TIMESTAMP | java.sql.Timestamp |
Use the Mapping page of the SQLAssist SmartGuide to remap the data retrieved from a table column to a different SQL data type, and thus, to a different Java class.
To reset the mapping of all columns to their default SQL data types, select Use Default.
When you finish specifying the result columns, select Next. This displays the SQL page of the SQLAssist SmartGuide. Use that page to view the SQL statement. You can also use the page to test or save the SQL statement.
Select Back to display the Sort page of the SQLAssist SmartGuide. If appropriate, you can then change the ordering of the result set.
You can also display any page in the SQL Assist SmartGuide by selecting its tab.
When you complete the specification of your SQL statement, select Finish. This generates the code for the SQL statement and closes the SQLAssist SmartGuide.
To cancel the visual composition of the SQL statement, select Cancel.