it.eng.qbe.export
Class SQLFieldsReader

java.lang.Object
  extended by it.eng.qbe.export.SQLFieldsReader
All Implemented Interfaces:
IFieldsReader

public class SQLFieldsReader
extends java.lang.Object
implements IFieldsReader

Class that can get fields (i.e name and type) from a sql query string

Author:
Gioia

Constructor Summary
SQLFieldsReader(java.lang.String query, java.sql.Connection connection)
          Instantiates a new sQL fields reader.
 
Method Summary
static java.lang.String getJdbcTypeClass(java.sql.ResultSetMetaData rsmd, int t)
          Gets the jdbc type class.
 java.util.Vector readFields()
          Read fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLFieldsReader

public SQLFieldsReader(java.lang.String query,
                       java.sql.Connection connection)
Instantiates a new sQL fields reader.

Parameters:
query - the query
connection - the connection
Method Detail

readFields

public java.util.Vector readFields()
                            throws java.lang.Exception
Description copied from interface: IFieldsReader
Read fields.

Specified by:
readFields in interface IFieldsReader
Returns:
the vector
Throws:
java.lang.Exception - the exception

getJdbcTypeClass

public static java.lang.String getJdbcTypeClass(java.sql.ResultSetMetaData rsmd,
                                                int t)
Gets the jdbc type class.

Parameters:
rsmd - the rsmd
t - the t
Returns:
the jdbc type class