com.sap.sql

Class DatabaseServices

java.lang.Object
  extended by com.sap.sql.DatabaseServices

public class DatabaseServices
extends 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 CheckerFactory createCheckerFactory()
           
static com.sap.sql.catalog.DictionaryReader getDictionaryReader(Connection connection)
          Gets a DictionaryReader object which provides metadata access to the database objects defined in the Dictionary.
static int getSQLType(Connection connection)
          Returns the SQL processor type (open, native, vendor) of the given database connection.
static Timestamp getUTCTimestamp(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 Timestamp getUTCTimestamp(Connection connection)
                                 throws 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:
SQLException - if a database error occurs

getDictionaryReader

public static com.sap.sql.catalog.DictionaryReader getDictionaryReader(Connection connection)
                                                                throws SQLException
Gets a DictionaryReader object which provides metadata access to the database objects defined in the Dictionary.

The Connection object specified must identify a valid database connection to an Open SQL data source. The life-cycle of DictionaryReader object returned is coupled with the life-cycle of the database connection.

Parameters:
connection - a database connection to an Open SQL data source
Returns:
a DictionaryReader object which provides metadata access to the database objects defined in the Dictionary
Throws:
SQLException - if a database error occurs

createCheckerFactory

public static CheckerFactory createCheckerFactory()

getSQLType

public static int getSQLType(Connection connection)
                      throws 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:
SQLException - if an error occurs
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] ENGFACADE [sap.com] tc/je/opensql/api api BC-JAS
[sap.com] ENGINEAPI [sap.com] opensqldeprecated default BC-JAS-PER-SQL
[sap.com] CORE-TOOLS [sap.com] com.sap.engine.client.libdeprecated default BC-JAS


Copyright 2012 SAP AG Complete Copyright Notice