All Packages This Package Previous Next
Class sqlj.runtime.profile.ref.TypeInfoImpl
java.lang.Object
|
+----sqlj.runtime.profile.TypeInfo
|
+----sqlj.runtime.profile.ref.TypeInfoImpl
- public class TypeInfoImpl
- extends TypeInfo
The TypeInfoImpl class provides a concreate implementation of the
TypeInfo class. Type info objects describe the type of a parameter
passed to a sql operation or column of a ResultSet produced by a sql
operation. The type consists of the java type of the actual Java
expression which appears in the original source file, its corrsponding
JDBC sql type, the name of the variable or column producing the type (if
available), its modality, and the index at which the parameter marker
appears in the original SQL string.
- See Also:
- getJavaType
-
TypeInfoImpl(String, int, String)
- Creates a new type info instance having the given java class name, sql
type, and name.
-
TypeInfoImpl(String, int, String, int, int)
- Creates a new type info instance having the given java class name, sql
type, name, mode, and marker index.
-
getJavaTypeName()
- Returns the name of the Java Class representation of the type.
-
getMarkerIndex()
- Returns the 0-based index of the '?' marker for this parameter in
the sql string.
-
getMode()
- Returns the modality of this parameter.
-
getName()
- Returns the name of the variable or column producing this type.
-
getSQLType()
- Returns the default mapping of this type as a SQL type, as defined in
java.sql.Types.
TypeInfoImpl
public TypeInfoImpl(String javaClassName,
int sqlType,
String name,
int mode,
int markerIndex)
- Creates a new type info instance having the given java class name, sql
type, name, mode, and marker index. The java class name is a fully
qualified java class name as described in the
getJavaClassName
method. An exception is thrown if the
parameters passed would cause an invalid type info object to be
created.
- Parameters:
- javaClassName - the fully qualified name of the java class
represented by this type
- sqlType - the sql type encoding of this type
- name - the name of the variable or column describeded by this type
- mode - the modality of the type
- markerIndex - the 0-based index of the marker in the SQL string
corresponding to this parameter (-1 if not a parameter).
- Throws: IllegalArgumentException
- if the type created is invalid
TypeInfoImpl
public TypeInfoImpl(String javaClassName,
int sqlType,
String name)
- Creates a new type info instance having the given java class name, sql
type, and name. The java class name is a fully qualified java class
name as described in the
getJavaClassName
method. An
exception is thrown if the parameters passed would cause an invalid
type info object to be created.
This constructor defaults the mode of the type created to OUT,
and the marker index to -1. It is most often used for result types.
- Parameters:
- javaClassName - the fully qualified name of the java class
represented by this type
- sqlType - the sql type encoding of this type
- name - the name of the variable or column describeded by this type
- Throws: IllegalArgumentException
- if the type created is invalid
getJavaTypeName
public String getJavaTypeName()
- Returns the name of the Java Class representation of the type. Each
type appears in the original source file as a Java expression
(variable) or cursor column whose type can be determined at compile
time.
- Returns:
- the name of the Java Class representation of the type.
- Overrides:
- getJavaTypeName in class TypeInfo
- See Also:
- getJavaType, getJavaTypeName
getSQLType
public int getSQLType()
- Returns the default mapping of this type as a SQL type, as defined in
java.sql.Types.
- Returns:
- the default mapping of this type as a SQL type.
- Overrides:
- getSQLType in class TypeInfo
- See Also:
- getSQLType
getName
public String getName()
- Returns the name of the variable or column producing this type.
- Returns:
- the name of the variable or column producing this type.
- Overrides:
- getName in class TypeInfo
- See Also:
- getName
getMode
public int getMode()
- Returns the modality of this parameter.
- Overrides:
- getMode in class TypeInfo
- See Also:
- getMode
getMarkerIndex
public int getMarkerIndex()
- Returns the 0-based index of the '?' marker for this parameter in
the sql string. Returns -1 if this object does not represent a
parameter.
- Overrides:
- getMarkerIndex in class TypeInfo
- See Also:
- getSQLString
All Packages This Package Previous Next