org.writersforge.catalan.process.workers.sql
Class TypeMap

java.lang.Object
  extended byorg.writersforge.catalan.process.workers.sql.TypeMap

public final class TypeMap
extends java.lang.Object

Encapsulates a mapping between an SQL type and a Java type.

Author:
jsheets

Constructor Summary
TypeMap(java.lang.String sqlType, java.lang.String javaType)
          Creates a new instance of TypeMap.
 
Method Summary
 java.lang.Class getJavaClass()
          Retrieves the Java Class object that corresponds to this Java type.
 java.lang.String getJavaType()
          Retrieves the Java type.
 java.lang.String getSqlType()
          Retrieves the SQL type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap(java.lang.String sqlType,
               java.lang.String javaType)
Creates a new instance of TypeMap.

Parameters:
sqlType - SQL type
javaType - Java type
Method Detail

getJavaType

public java.lang.String getJavaType()
Retrieves the Java type.

Returns:
the Java type

getSqlType

public java.lang.String getSqlType()
Retrieves the SQL type.

Returns:
the SQL type

getJavaClass

public java.lang.Class getJavaClass()
Retrieves the Java Class object that corresponds to this Java type. Works for primitive types. Classes inside the java.lang package can be expressed without the package prefix, so "Object" is equivalent to "java.lang.Object". If the Java Class cannot be found, returns a null.

Returns:
the corresponding Java Class, or null if not found