org.apache.ws.jaxme.pm.generator.jdbc

Class JaxMeJdbcSG.Mode

public static class JaxMeJdbcSG.Mode extends Object

A database mode specifies, how JDBC metadata is being interpreted. The main use is for Oracle, which has a rather peculiar understanding of JDBC metadata.
Field Summary
static JaxMeJdbcSG.ModeGENERIC

Default database mode; types are taken as reported by the JDBC driver.

static JaxMeJdbcSG.ModeORACLE

Oracle database mode; the type NUMERIC is interpreted as FLOAT, TINYINT, SMALLINT, INTEGER, BIGINT, or DOUBLE, depending on scale and precision.

Method Summary
booleanequals(Object o)
StringgetName()
Returns the modes name.
inthashCode()
StringtoString()
static JaxMeJdbcSG.ModevalueOf(String pMode)
Returns an instance of Mode with the given name.

Field Detail

GENERIC

public static final JaxMeJdbcSG.Mode GENERIC

Default database mode; types are taken as reported by the JDBC driver.

ORACLE

public static final JaxMeJdbcSG.Mode ORACLE

Oracle database mode; the type NUMERIC is interpreted as FLOAT, TINYINT, SMALLINT, INTEGER, BIGINT, or DOUBLE, depending on scale and precision. This mode is turned on by setting the option jdbc.dbmode or if the method java.sql.DatabaseMetaData#getDatabaseProductName() returns the value "Oracle".

Method Detail

equals

public boolean equals(Object o)

getName

public String getName()
Returns the modes name.

hashCode

public int hashCode()

toString

public String toString()

valueOf

public static JaxMeJdbcSG.Mode valueOf(String pMode)
Returns an instance of Mode with the given name.

Throws: IllegalArgumentException The mode name is invalid.