Class Hierarchy    Previous  Next  Index

Class COM.cloudscape.database.Factory

java.lang.Object
    |
    +----COM.cloudscape.database.Factory

public class Factory
extends java.lang.Object
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.

This class is exists for the time being to provide access to database objects. IT WILL BE REMOVED IN A FUTURE RELEASE.

Callers of these methods must be within the context of a cloudscape statement execution otherwise a SQLException will be thrown.
There are two basic ways to call these methods.

  1. Within a SQL statement.
    -- checkpoint the database
    CALL (CLASS COM.cloudscape.database.Factory).
    getDatabaseOfConnection().checkpoint();
    
  2. In a server-side JDBC method.
    import COM.cloudscape.database.*;
    
    ...
    
    // checkpoint the database
    Database db = Factory.getDatabaseOfConnection();
    db.checkpoint();
    
    

Previous releases of this class included methods that threw COM.cloudscape.database.DatabaseException. This DatabaseException class has been removed and now methods throw java.sql.SQLException.

Cloudscape reserves the right to change, rename, or remove this interface at any time.


Constructor Index

 o Factory()
 

Method Index

 o getDatabaseOfConnection()

Returns the Database object associated with the current connection.

 o getSystemOfConnection()
THIS METHOD WILL BE REMOVED IN A FUTURE RELEASE

Return the System object associated with the current connection.

 o getTriggerExecutionContext()
Get the TriggerExecutionContext for the current connection of the connection.
 o getTypeFactory()
THIS METHOD MAY BE REMOVED IN A FUTURE RELEASE

Returns a type factory.

Constructor Detail

 o Factory
public Factory()

Method Detail

 o getDatabaseOfConnection
public static Database getDatabaseOfConnection() throws java.sql.SQLException
          

Returns the Database object associated with the current connection.

Throws:
java.sql.SQLException - Not in a connection context.
 o getSystemOfConnection
public static System getSystemOfConnection()
          THIS METHOD WILL BE REMOVED IN A FUTURE RELEASE

Return the System object associated with the current connection. This is the System associated with the database accessed by the current connection.

 o getTypeFactory
public static TypeFactory getTypeFactory() throws java.sql.SQLException
          THIS METHOD MAY BE REMOVED IN A FUTURE RELEASE

Returns a type factory. If there is a problem, null is returned

Throws:
java.sql.SQLException - Not in a connection context.
 o getTriggerExecutionContext
public static TriggerExecutionContext getTriggerExecutionContext() throws java.sql.SQLException
          Get the TriggerExecutionContext for the current connection of the connection.
Returns:
the TriggerExecutionContext if called from the context of a trigger; otherwise, null.
Throws:
java.sql.SQLException - Not in a connection or trigger context.

  Class Hierarchy    Previous  Next  Index