|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.platform.plugin.services.connections.sql.SQLConnection
public class SQLConnection
| Field Summary | |
|---|---|
static int |
CONCUR_READONLY
|
static int |
CONCUR_UPDATABLE
|
static int |
RESULTSET_FORWARDONLY
|
static int |
RESULTSET_SCROLLABLE
|
| Fields inherited from interface org.pentaho.commons.connection.IPentahoConnection |
|---|
CLASSNAME_KEY, CONNECTION, DRIVER_KEY, HQL_DATASOURCE, JNDI_NAME_KEY, KEYS, LOCATION_KEY, MDX_DATASOURCE, NONE_DATASOURCE, PASSWORD_KEY, PROVIDER, QUERY_KEY, SQL_DATASOURCE, USERNAME_KEY, XML_DATASOURCE |
| Constructor Summary | |
|---|---|
SQLConnection()
|
|
SQLConnection(String driverName,
String location,
String userName,
String password,
ILogger logger)
|
|
| Method Summary | |
|---|---|
void |
clearWarnings()
|
void |
close()
|
boolean |
connect(Properties props)
|
int |
execute(String query)
|
int |
execute(String query,
int scrollType,
int concur)
|
org.pentaho.commons.connection.IPentahoResultSet |
executeQuery(String query)
Executes the specified query. |
org.pentaho.commons.connection.IPentahoResultSet |
executeQuery(String query,
int scrollType,
int concur)
Executes the specified query with the defined parameters |
String |
getDatasourceType()
return datasource type SQL |
int |
getFetchSize()
|
String |
getLastQuery()
|
int |
getMaxRows()
|
Connection |
getNativeConnection()
|
int |
getQueryTimeout()
Returns the query timeout value (in seconds) |
boolean |
getReadOnly()
Returns the state of the readonly flag |
org.pentaho.commons.connection.IPentahoResultSet |
getResultSet()
|
boolean |
initialized()
|
boolean |
isClosed()
|
boolean |
isFallBackToNonscrollableOnError()
|
boolean |
isForcedForwardOnly()
|
boolean |
isReadOnly()
|
org.pentaho.commons.connection.IPentahoResultSet |
prepareAndExecuteQuery(String query,
List parameters)
|
org.pentaho.commons.connection.IPentahoResultSet |
prepareAndExecuteQuery(String query,
List parameters,
int scrollType,
int concur)
|
boolean |
preparedQueriesSupported()
|
void |
setFallBackToNonscrollableOnError(boolean fallBackToNonscrollableOnError)
|
void |
setFetchSize(int fetchSize)
|
void |
setForcedForwardOnly(boolean forcedForwardOnly)
|
void |
setLogger(ILogger logger)
|
void |
setMaxRows(int maxRows)
|
void |
setProperties(Properties props)
|
void |
setQueryTimeout(int timeInSec)
Sets the valid of the timeout (in seconds) |
void |
setReadOnly(boolean value)
Sets the connection object to readonly. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RESULTSET_SCROLLABLE
public static final int RESULTSET_FORWARDONLY
public static final int CONCUR_READONLY
public static final int CONCUR_UPDATABLE
| Constructor Detail |
|---|
public SQLConnection()
public SQLConnection(String driverName,
String location,
String userName,
String password,
ILogger logger)
| Method Detail |
|---|
public void setLogger(ILogger logger)
setLogger in interface IPentahoLoggingConnectionpublic void setProperties(Properties props)
setProperties in interface org.pentaho.commons.connection.IPentahoConnectionpublic void setQueryTimeout(int timeInSec)
setQueryTimeout in interface org.pentaho.commons.connection.ILimitableConnectionpublic void setReadOnly(boolean value)
value - public int getQueryTimeout()
public boolean initialized()
initialized in interface org.pentaho.commons.connection.IPentahoConnectionpublic String getDatasourceType()
getDatasourceType in interface org.pentaho.commons.connection.IPentahoConnectionpublic void close()
close in interface org.pentaho.commons.connection.IPentahoConnectionpublic String getLastQuery()
getLastQuery in interface org.pentaho.commons.connection.IPentahoConnection
public org.pentaho.commons.connection.IPentahoResultSet executeQuery(String query)
throws SQLException,
InterruptedException,
PentahoSystemException
executeQuery in interface org.pentaho.commons.connection.IPentahoConnectionquery - the query to execute
SQLException - indicates an error running the query
InterruptedException - indicates that the query took longer than the allowed timeout value
PentahoSystemException
public org.pentaho.commons.connection.IPentahoResultSet executeQuery(String query,
int scrollType,
int concur)
throws SQLException,
InterruptedException,
PentahoSystemException
query - the query to be executedscrollType - concur -
SQLException - indicates an error running the query
InterruptedException - indicates the query took longer than allowable by the query timeout
PentahoSystemException
public org.pentaho.commons.connection.IPentahoResultSet prepareAndExecuteQuery(String query,
List parameters)
throws SQLException
prepareAndExecuteQuery in interface org.pentaho.commons.connection.IPentahoConnectionSQLException
public org.pentaho.commons.connection.IPentahoResultSet prepareAndExecuteQuery(String query,
List parameters,
int scrollType,
int concur)
throws SQLException
SQLExceptionpublic boolean preparedQueriesSupported()
preparedQueriesSupported in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean isClosed()
isClosed in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean isReadOnly()
isReadOnly in interface org.pentaho.commons.connection.IPentahoConnectionpublic void clearWarnings()
clearWarnings in interface org.pentaho.commons.connection.IPentahoConnectionpublic org.pentaho.commons.connection.IPentahoResultSet getResultSet()
getResultSet in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean connect(Properties props)
connect in interface org.pentaho.commons.connection.IPentahoConnection
public int execute(String query)
throws SQLException
SQLException
public int execute(String query,
int scrollType,
int concur)
throws SQLException
SQLExceptionpublic Connection getNativeConnection()
public int getFetchSize()
public void setFetchSize(int fetchSize)
setFetchSize in interface org.pentaho.commons.connection.IPentahoConnectionfetchSize - The fetchSize to set.public int getMaxRows()
public void setMaxRows(int maxRows)
setMaxRows in interface org.pentaho.commons.connection.ILimitableConnectionsetMaxRows in interface org.pentaho.commons.connection.IPentahoConnectionmaxRows - The maxRows to set.public boolean getReadOnly()
public void setFallBackToNonscrollableOnError(boolean fallBackToNonscrollableOnError)
public boolean isFallBackToNonscrollableOnError()
public boolean isForcedForwardOnly()
public void setForcedForwardOnly(boolean forcedForwardOnly)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||