2004.04.29


com.jdc.db
Interface Database

All Known Implementing Classes:
Database

public interface Database

Database represents an application database.

Version:
2.0
Author:
Jay Damon
See Also:
Connection

Method Summary
 boolean close()
          Closes the database connection, if open.
 String getAlias()
          Returns the database alias.
 Connection getConnection()
          Returns an available database connection.
 String getName()
          Returns the database name.
 DatabaseType getType()
          Returns the database type.
 boolean open()
          Opens a database connection.
 

Method Detail

close

public boolean close()
Closes the database connection, if open. The database resources in use by this Connection are released immediately.

Returns:
True if the database connection is successfully closed.
False if the database connection is not successfully closed.

getAlias

public String getAlias()
Returns the database alias.

Returns:
The database alias.

getConnection

public Connection getConnection()
Returns an available database connection. A database connection is implicitly opened if open() was not previously invoked.

Returns:
A database Connection object.

getName

public String getName()
Returns the database name.

Returns:
The database name.

getType

public DatabaseType getType()
Returns the database type.

Returns:
The database type.

open

public boolean open()
Opens a database connection.

Returns:
True if a database connection is successfully opened.
False if a database connection is not successfully opened.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.