org.eclipse.datatools.sqltools.core
Class DBHelper

java.lang.Object
  extended byorg.eclipse.datatools.sqltools.core.DBHelper

public class DBHelper
extends java.lang.Object

Vendors can subclass this class to provide database-specific utility methods.

Author:
Hui Cao

Constructor Summary
DBHelper()
           
 
Method Summary
 java.lang.String calculateTriggerTableName(ProcIdentifier procid)
          Given a trigger, returns the table name.
 int getCorrectParamType(int jdbcType)
          This method is for vendors to fix JDBC driver bugs.
 ProcIdentifier getProcIdentifier(DatabaseIdentifier databaseIdentifier, java.lang.String dbObjectName, int dbObjectType, java.lang.String tableName, java.lang.String ownerName)
          Returns a ProcIdentifer based on the profilename and object name & type
 java.lang.String[] getSysOwnerNames()
          Gets all the system ownerName
 boolean isAdHocProc(ProcIdentifier procid)
          Tells whether the procedural object is "ADHOC", meaning we don't need to show stack frame and open editor for it.
 boolean justWarnings(java.sql.SQLException sqlexception)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBHelper

public DBHelper()
Method Detail

calculateTriggerTableName

public java.lang.String calculateTriggerTableName(ProcIdentifier procid)
Given a trigger, returns the table name. Default implementation simply return the table name defined in ProcIdentifier.

Parameters:
procid - trigger identifier
Returns:
table name

isAdHocProc

public boolean isAdHocProc(ProcIdentifier procid)
Tells whether the procedural object is "ADHOC", meaning we don't need to show stack frame and open editor for it. Usually this is the statement used to trigger the to-be-debugged routine.

Parameters:
procid - the routine identifier
Returns:
true if it is "ADHOC"

getProcIdentifier

public ProcIdentifier getProcIdentifier(DatabaseIdentifier databaseIdentifier,
                                        java.lang.String dbObjectName,
                                        int dbObjectType,
                                        java.lang.String tableName,
                                        java.lang.String ownerName)
Returns a ProcIdentifer based on the profilename and object name & type

Parameters:
databaseIdentifier -
dbObjectName -
dbObjectType - @see ProcIdentifier
Returns:
a ProcIdentifer object

justWarnings

public boolean justWarnings(java.sql.SQLException sqlexception)

getSysOwnerNames

public java.lang.String[] getSysOwnerNames()
Gets all the system ownerName

Returns:
owner name array

getCorrectParamType

public int getCorrectParamType(int jdbcType)
This method is for vendors to fix JDBC driver bugs. If the parameter type in a routine object returned by the JDBC driver is not correct, vendors should implement this method to provide the correct type.

Parameters:
jdbcType - the parameter type returned by the JDBC driver
Returns:
one of java.sql.ParameterMetadata.parameterModeIn,java.sql.ParameterMetadata.parameterModeOut, java.sql.ParameterMetadata.parameterModeInOut and java.sql.ParameterMetadata.parameterModeUnknown


Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.