# The Java Type Map Class

The following is the Java type map class shipped with JDeveloper.

`/** Copyright (c) Oracle Corporation 2000. All Rights Reserved. */`
`package oracle.jbo.server;`
`import oracle.jbo.common.JboTypeMap;`

`/**`
`* Populates TypeMap Entries for BC4J Designtime and Runtime`
`* to map a Database column type to a java-class type and also to jdbc-sqltype and id.`
`* The entries should be:`
`* COLUMN_TYPE - column type in the database`
`* JAVA_CLASS_NAME - Java class which should store in-memory data from the given column-type`
`* JDBC_SQL_TYPE - Name of the jdbc sql type id that the subsequent integer-entry represents.`
`* JDBC_SQL_TYPE_ID - Integer value from java.sql.Types or a corresponding Types list in jdbc.`
`* DISPLAY_LENGTH - Default size for various String/Character types.`
`*`
`* @since JDeveloper 3.2`
`*/`
`public class JavaTypeMapEntries`
`{`
``
`public JavaTypeMapEntries()`
`{`

`/* from the Olite documentation`
`Java Datatypes SQL Datatype`
`------------------------------------------------------------------------------`
`byte[], byte[][], Byte[] BINARY, RAW, VARBINARY`
`boolean, Boolean BIT`
`String, String[] CHAR, VARCHAR, VARCHAR2`
`short, short[], short[][], Short, Short[] SMALLINT`
`int, int[], int[][], Integer, Integer[] INT`
`float, float[], float[][], Float, Float[] REAL`
`double, double[], double[][], Double, Double[] DOUBLE, NUMBER (without precision)`
`BigDecimal, BigDecimal[] NUMBER(n)`
`java.sql.Date, java.sql.Date[] DATE`
`java.sql.Time, java.sql.Time[] TIME`
`java.sql.Timestamp, java.sql.Timestamp[] TIMESTAMP`
`java.sql.Connection Default JDBC connection to database`
`oracle.lite.jac.POLJACConnection Default JAC connection to database`
`oracle.lite.jac.POLPersistantCapable JAC instance of the object`
`------------------------------------------------------------------------------`
`*/`
`// COLUMN_TYPE JAVA_CLASS_NAME JDBC_SQL_TYPE JDBC_SQL_TYPE_ID, DISPLAY_LENGTH, NUMERIC_TYPE);`
`// ------------------------------------------------------------------------------------------------------------------------`
`new JboTypeMap("BIGINT", "java.math.BigDecimal", "NUMERIC", java.sql.Types.NUMERIC, null, true);`
`new JboTypeMap("BIT", "java.lang.Boolean", "BIT", java.sql.Types.BIT, null);`
`new JboTypeMap("CHAR", "java.lang.String", "VARCHAR", java.sql.Types.VARCHAR, null);`
`new JboTypeMap("DATE", "java.sql.Date", "DATE", java.sql.Types.DATE, null);`
`new JboTypeMap("DECIMAL", "java.math.BigDecimal", "DECIMAL", java.sql.Types.DECIMAL, null, true);`
`new JboTypeMap("DOUBLE PRECISION", "java.math.BigDecimal", "DOUBLE", java.sql.Types.DOUBLE, null, true);`
`new JboTypeMap("DOUBLE", "java.math.BigDecimal", "DOUBLE", java.sql.Types.DOUBLE, null, true);`
`new JboTypeMap("FLOAT", "java.lang.Float", "FLOAT", java.sql.Types.FLOAT, null, true);`
`new JboTypeMap("INTEGER", "java.lang.Integer", "INTEGER", java.sql.Types.INTEGER, null, true);`
`new JboTypeMap("NUMBER", "java.math.BigDecimal", "NUMERIC", java.sql.Types.NUMERIC, null, true);`
`new JboTypeMap("NUMERIC", "java.math.BigDecimal", "NUMERIC", java.sql.Types.NUMERIC, null, true);`
`new JboTypeMap("REAL", "java.math.BigDecimal", "REAL", java.sql.Types.REAL, null, true);`
`new JboTypeMap("ROWID", "java.lang.String", "VARCHAR", java.sql.Types.VARCHAR, null);`
`new JboTypeMap("SMALLINT", "java.lang.Integer", "SMALLINT", java.sql.Types.SMALLINT, null, true);`
`new JboTypeMap("TIMESTAMP", "java.sql.Timestamp", "TIMESTAMP", java.sql.Types.TIMESTAMP, null);`
`new JboTypeMap("TIME", "java.sql.Time", "TIME", java.sql.Types.TIME, null);`
`new JboTypeMap("TINYINT", "java.lang.Integer", "TINYINT", java.sql.Types.TINYINT, null, true);`
`new JboTypeMap("VARCHAR", "java.lang.String", "VARCHAR", java.sql.Types.VARCHAR, null);`
`new JboTypeMap("VARCHAR2", "java.lang.String", "VARCHAR", java.sql.Types.VARCHAR, null);`
`//TODO java.sql.types.LONGVARCHAR, BINARY, VARBINARY, LONGVARBINARY, NULL`
`// ------------------------------------------------------------------------------------------------------------------------`
`}`
`}`
``