com.sap.sql
Class DatabaseServices

java.lang.Object
  |
  +--com.sap.sql.DatabaseServices

public class DatabaseServices
extends java.lang.Object

A collection of services and utilities regarding the database server.


Field Summary
static int SQL_TYPE_NATIVE_SQL
          SQL processor of type Native SQL
static int SQL_TYPE_OPEN_SQL
          SQL processor of type Open SQL
static int SQL_TYPE_VENDOR_SQL
          SQL processor of type Vendor SQL
 
Method Summary
static int getSQLType(java.sql.Connection connection)
          Returns the SQL processor type (open, native, vendor) of the given database connection.
static java.sql.Timestamp getUTCTimestamp(java.sql.Connection connection)
          Returns the current UTC time on the DB server as a Timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQL_TYPE_OPEN_SQL

public static final int SQL_TYPE_OPEN_SQL
SQL processor of type Open SQL

SQL_TYPE_NATIVE_SQL

public static final int SQL_TYPE_NATIVE_SQL
SQL processor of type Native SQL

SQL_TYPE_VENDOR_SQL

public static final int SQL_TYPE_VENDOR_SQL
SQL processor of type Vendor SQL
Method Detail

getUTCTimestamp

public static java.sql.Timestamp getUTCTimestamp(java.sql.Connection connection)
                                          throws java.sql.SQLException
Returns the current UTC time on the DB server as a Timestamp.

This time is represented by the number of milliseconds since January 1, 1970, 00:00:00 GMT and can be obtained by calling method getTime() on the returned timestamp.

Parameters:
connection - a database connection
Returns:
the current UTC time on the DB server
Throws:
java.sql.SQLException - if a database error occurs

getSQLType

public static int getSQLType(java.sql.Connection connection)
                      throws java.sql.SQLException
Returns the SQL processor type (open, native, vendor) of the given database connection.

The result is one of the constants SQL_TYPE_* defined above.

Parameters:
connection - a database connection
Returns:
the SQL processor type (open, native, vendor) of the given database connection
Throws:
java.sql.SQLException - if an error occurs