at.glawar
GlawarDataAdapter [2006-07-04]

at.glawar.dbcommunication
Class DBCFirebird

java.lang.Object
  extended byat.glawar.dbcommunication.DBCFirebird

public class DBCFirebird
extends Object

provides methods for doing some special things about Firebird.

at the moment you can call procedures and functions whereas functions are supported that only returns ONE parameter and the parameter is of one of the following types:

Since:
2006-03-22
Version:
$Revision: 1.3 $ ($Date: 2006/06/01 18:28:36 $)
Author:
DI Franz-Peter Glawar last modified by: $Author: frahunz $, software.glawar.at

Constructor Summary
DBCFirebird(Connection con)
          initializes a new instance of DBCFirebird.
 
Method Summary
 int callDBINTEGERFunction(String strFunctionName, Object[] oaParameters, String strDBPrefix, int iDefaultValue)
          Execute a function with a variable amount of parameters.
 BigDecimal callDBNUMERICFunction(String strFunctionName, Object[] oaParameters, String strDBPrefix, BigDecimal bdDefaultValue)
          Execute a function with a variable amount of parameters.
 void callDBProcedure(String strProcedureName, Object[] oaParameters, String strDBPrefix)
          Calls a db-procedure with a variable amount of parameters.
 Date callDBTIMESTAMPFunction(String strFunctionName, Object[] oaParameters, String strDBPrefix, Date dDefaultValue)
          Execute a function with a variable amount of parameters.
 String callDBVARCHARFunction(String strFunctionName, Object[] oaParameters, String strDBPrefix, String strDefaultValue)
          Execute a function with a variable amount of parameters.
static String formatTimeStampParam(Date dValue)
          format a java.util.Date to a String that can be used by Firebird's timestamp.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBCFirebird

public DBCFirebird(Connection con)

initializes a new instance of DBCFirebird.

Parameters:
con - a valid database connection
Since:
2006-03-22
Method Detail

formatTimeStampParam

public static final String formatTimeStampParam(Date dValue)

format a java.util.Date to a String that can be used by Firebird's timestamp.

Parameters:
dValue - java.util.Date that should be formatted into Firebird's Timestamp
Returns:
Firebird-usable-format
Since:
2006-03-22

callDBProcedure

public void callDBProcedure(String strProcedureName,
                            Object[] oaParameters,
                            String strDBPrefix)
                     throws SQLException

Calls a db-procedure with a variable amount of parameters.

Parameters:
strProcedureName - name of the procedure without database prefix (e. g. PACKAGENAME.procedureName)
oaParameters - Object-array containing all the parameters, can be null as well, which means no-parameter-at-all
strDBPrefix - database Prefix, not null
Throws:
SQLException - if an error occured
Since:
2006-03-22

callDBINTEGERFunction

public int callDBINTEGERFunction(String strFunctionName,
                                 Object[] oaParameters,
                                 String strDBPrefix,
                                 int iDefaultValue)
                          throws SQLException

Execute a function with a variable amount of parameters.

Parameters:
strFunctionName - name of the function without database prefix (e. g. PACKAGENAME.functionName)
oaParameters - Object-array containing all the parameters, can be null as well, which means no-parameter-at-all
strDBPrefix - database Prefix, not null
iDefaultValue - default value for returning
Returns:
the int-result of the function if the function just returns ONE value
Throws:
SQLException - if an error occured
Since:
2006-03-22

callDBTIMESTAMPFunction

public Date callDBTIMESTAMPFunction(String strFunctionName,
                                    Object[] oaParameters,
                                    String strDBPrefix,
                                    Date dDefaultValue)
                             throws SQLException

Execute a function with a variable amount of parameters.

Parameters:
strFunctionName - name of the function without database prefix (e. g. PACKAGENAME.functionName)
oaParameters - Object-array containing all the parameters, can be null as well, which means no-parameter-at-all
strDBPrefix - database Prefix, not null
dDefaultValue - default value for returning
Returns:
the java.util.Date-result of the function if the function just returns ONE value
Throws:
SQLException - if an error occured
Since:
2006-03-22

callDBVARCHARFunction

public String callDBVARCHARFunction(String strFunctionName,
                                    Object[] oaParameters,
                                    String strDBPrefix,
                                    String strDefaultValue)
                             throws SQLException

Execute a function with a variable amount of parameters.

Parameters:
strFunctionName - name of the function without database prefix (e. g. PACKAGENAME.functionName)
oaParameters - Object-array containing all the parameters, can be null as well, which means no-parameter-at-all
strDBPrefix - database Prefix, not null
strDefaultValue - default value for returning
Returns:
the String-result of the function if the function just returns ONE value
Throws:
SQLException - if an error occured
Since:
2006-03-22

callDBNUMERICFunction

public BigDecimal callDBNUMERICFunction(String strFunctionName,
                                        Object[] oaParameters,
                                        String strDBPrefix,
                                        BigDecimal bdDefaultValue)
                                 throws SQLException

Execute a function with a variable amount of parameters.

Parameters:
strFunctionName - name of the function without database prefix (e. g. PACKAGENAME.functionName)
oaParameters - Object-array containing all the parameters, can be null as well, which means no-parameter-at-all
strDBPrefix - database Prefix, not null
bdDefaultValue - default value for returning
Returns:
the BigDecimal-result of the function if the function just returns ONE value
Throws:
SQLException - if an error occured
Since:
2006-03-22

software.glawar.at

Developed by software.glawar.at