| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.sqltools.sqleditor.internal.utils.SQLDBUtils
public class SQLDBUtils
Provides database services for the editor. This includes services for selecting and re-establishing a database connection.
| Constructor Summary | |
|---|---|
| SQLDBUtils() | |
| Method Summary | |
|---|---|
| static java.sql.ResultSet | executeSQL(java.sql.Connection conn,
           java.lang.String sql)Creates a SQL Statement and execute the statement using JDBC executeQuery method. | 
| static java.lang.String | getDefaultSchemaName(ISQLEditorConnectionInfo connInfo) | 
| static boolean | isConnected(ISQLEditorConnectionInfo connInfo)Determines if the DB connection described by the given ISQLEditorConnectionInfois actively connected | 
| static boolean | isDefaultUser(ISQLEditorConnectionInfo connInfo)Determines if the given ISQLEditorConnectionInfois references the
 default user ID. | 
| static boolean | isPromptNeeded(ISQLEditorConnectionInfo connInfo)Determines if a user ID and password prompt is needed for the given ISQLEditorConnectionInfoobject. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SQLDBUtils()
| Method Detail | 
|---|
public static java.sql.ResultSet executeSQL(java.sql.Connection conn,
                                            java.lang.String sql)
                                     throws java.sql.SQLException
conn - the Connection object to usesql - the SQL statement to execute
ResultSet resulting from running the query
java.sql.SQLExceptionpublic static boolean isConnected(ISQLEditorConnectionInfo connInfo)
ISQLEditorConnectionInfo
 is actively connected
connInfo - the ISQLEditorConnectionInfo to check
public static boolean isDefaultUser(ISQLEditorConnectionInfo connInfo)
ISQLEditorConnectionInfo is references the
 default user ID.  This is done by checking if both the user ID and password 
 are empty and non-null.
connInfo - the ISQLEditorConnectionInfo object to check
public static boolean isPromptNeeded(ISQLEditorConnectionInfo connInfo)
ISQLEditorConnectionInfo object.  This is done by checking if either 
 the user ID or password is null or empty.
connInfo - the ISQLEditorConnectionInfo to checktrue - when userid/password prompt is needed, otherwise falsepublic static java.lang.String getDefaultSchemaName(ISQLEditorConnectionInfo connInfo)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||