org.wamblee.support.persistence
Interface DatabaseProvider

All Known Implementing Classes:
AbstractDatabaseProvider, DerbyDatabaseProvider, ExternalDatabaseProvider

public interface DatabaseProvider

Database provider. This database provider represents a particular type of database such as its capabilities and the ability to create an instance representing a running database. Since the DatabaseBuilder uses a first match algorithm and the order of databaseproviders is not guaranteed, it is recommended for each database provider to also provide a unique capability that no other database has.


Field Summary
static java.lang.String CAPABILITY_EXTERNAL
          Capability that all databases that are external have.
static java.lang.String CAPABILITY_IN_MEMORY
          Capability that all databases that run inmemory have.
 
Method Summary
 Database create()
          Creates a database instance that represents a running instance of that database.
 DatabaseDescription getDescription()
          Gets the description for the database.
 boolean supportsCapabilities(java.lang.String[] aCapabilities)
          Determines if the database has all capabilities that are requested.
 

Field Detail

CAPABILITY_IN_MEMORY

static final java.lang.String CAPABILITY_IN_MEMORY
Capability that all databases that run inmemory have.

See Also:
Constant Field Values

CAPABILITY_EXTERNAL

static final java.lang.String CAPABILITY_EXTERNAL
Capability that all databases that are external have.

See Also:
Constant Field Values
Method Detail

supportsCapabilities

boolean supportsCapabilities(java.lang.String[] aCapabilities)
Determines if the database has all capabilities that are requested.

Parameters:
aCapabilities - Capabilities it must ahve
Returns:
True if it has all capabilities.

getDescription

DatabaseDescription getDescription()
Gets the description for the database.

Returns:
Description.

create

Database create()
Creates a database instance that represents a running instance of that database.

Returns:
Database.


Copyright © 2010. All Rights Reserved.