|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.io.common.Source
public class Source
Creates Cursors from extern relational DB. Used only for developpers convienence hence undocumented. You may create input cursors in any other way you want
| Field Summary | |
|---|---|
static String |
ACCESS
|
static String |
DB2
|
static String |
EXCEL
|
static String |
ODDBC
|
static String |
ORACLE
|
static String |
SELECT_CURSOR
|
static String |
SELECT_DIRECT
|
static String |
SQL_SERVER_2005
|
static String |
SQL_SERVER_2008
|
| Constructor Summary | |
|---|---|
Source(ICdmDataSource cdmDataSource)
Creates a source with parameters of a ICdmDataSource instance |
|
Source(String dbms,
String server,
String db)
Creates a source and sets the according variables |
|
Source(String dbms,
String server,
String db,
boolean cursor)
Creates a source and sets the parameter. |
|
Source(String dbms,
String server,
String db,
int port)
Creates a source and sets the parameter. |
|
Source(String dbms,
String server,
String db,
String query)
Creates a source and sets the query string |
|
| Method Summary | |
|---|---|
boolean |
checkColumnExists(String tableName,
String dbAttribute)
Checks if an attribute exists in the database schema. |
Connection |
getConnection()
Returns the connection. |
String |
getDatabase()
|
ResultSet |
getResultSet()
Returns the Resultset for Sources query. |
ResultSet |
getResultSet(String query)
Returns the Resultset for query 'query'. |
String |
getServer()
|
boolean |
isDoLog()
|
void |
setDoLog(boolean doLog)
|
Source |
setPassword(String pwd)
Sets the password. |
Source |
setPort(int port)
Sets the port. |
Source |
setQuery(String query)
|
Source |
setUserAndPwd(String userName,
String pwd)
Sets the username and password. |
Source |
setUsername(String userName)
Sets the username. |
String |
toString()
|
int |
update(String updateStatement)
Executes an insert, update or delete statement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String SQL_SERVER_2005
public static final String SQL_SERVER_2008
public static final String ACCESS
public static final String EXCEL
public static final String ODDBC
public static final String ORACLE
public static final String DB2
public static final String SELECT_DIRECT
public static final String SELECT_CURSOR
| Constructor Detail |
|---|
public Source(String dbms,
String server,
String db)
dbms - name of database management system (e.g. "SQLServer", "Access", "Excel", "Oracle"server - name of server, if dbms is ODBC, this must be the ODBC namedb - name of database
public Source(String dbms,
String server,
String db,
String query)
dbms - name of database management system (e.g. "SQLServer", "Access", "Excel", "Oracle"server - name of server, if dbms is ODBC, this must be the ODBC namedb - name of databasequery - the query
public Source(String dbms,
String server,
String db,
boolean cursor)
cursor - access mode, if true 'cursor', if false 'direct'
public Source(String dbms,
String server,
String db,
int port)
dbms - name of database management system (e.g. "SQLServer", "Access", "Excel", "Oracle"server - name of server, if dbms is ODBC, this must be the ODBC namedb - name of databaseport - the databases port (-1: use default port)public Source(ICdmDataSource cdmDataSource)
cdmDataSource - | Method Detail |
|---|
public ResultSet getResultSet(String query)
public int update(String updateStatement)
public ResultSet getResultSet()
public Connection getConnection()
public Source setQuery(String query)
query - public Source setUsername(String userName)
userName - public Source setPassword(String pwd)
pwd -
public Source setUserAndPwd(String userName,
String pwd)
userName - pwd - public Source setPort(int port)
userName - pwd - public String getDatabase()
public String getServer()
public boolean isDoLog()
public void setDoLog(boolean doLog)
public boolean checkColumnExists(String tableName,
String dbAttribute)
throws NoSuchMethodException
tableName - dbAttribute -
org.apache.http.MethodNotSupportedException
NoSuchMethodExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||