| java.lang.Object org.netbeans.lib.ddl.impl.SpecificationFactory
SpecificationFactory | public class SpecificationFactory implements DatabaseSpecificationFactory,DriverSpecificationFactory(Code) | | The factory used for creating instances of Specification class.
SpecificationFactory collects information about available database
description files and is able to specify if system can control
the database (specified by product name or live connection) or not.
It also provides a list of supported databases. Information about databases
reads from file org/netbeans/lib/ddl/DatabaseSpecification.plist. It's possible to replace it
by setting db.specifications.file system property pointing to another one.
author: Slavek Psenicka |
Constructor Summary | |
public | SpecificationFactory() Constructor.
Reads a bunch of specification files and prepares sfiles array. |
SpecificationFactory | public SpecificationFactory() throws DDLException(Code) | | Constructor.
Reads a bunch of specification files and prepares sfiles array. Files should
be read from default place or from folder specified by system property named
"db.specifications.folder".
|
createDriverSpecification | public DriverSpecification createDriverSpecification(String driverName)(Code) | | Creates instance of DriverSpecification class; a driver-specification
class. This object knows about used driver.
|
createSpecification | public DatabaseSpecification createSpecification(DBConnection dbcon, Connection jdbccon) throws DatabaseProductNotFoundException, DDLException(Code) | | Creates instance of DatabaseSpecification class; a database-specification
class. This object knows about used database and can be used as
factory for db-manipulating commands. It connects to the database
and reads database metadata. Throws DatabaseProductNotFoundException if database
(obtained from database metadata) is not supported. Uses given Connection
|
createSpecification | public DatabaseSpecification createSpecification(DBConnection connection, String databaseProductName, Connection c) throws DatabaseProductNotFoundException(Code) | | Creates instance of DatabaseSpecification class; a database-specification
class. This object knows about used database and can be used as
factory for db-manipulating commands. It connects to database and
reads metadata as createSpecification(DBConnection connection), but always
uses specified databaseProductName. This is not recommended technique.
|
createSpecification | public DatabaseSpecification createSpecification(String databaseProductName, Connection c) throws DatabaseProductNotFoundException(Code) | | Creates instance of DatabaseSpecification class; a database-specification
class. This object knows about used database and can be used as
factory for db-manipulating commands. It connects to database and
reads metadata as createSpecification(DBConnection connection), but always
uses specified databaseProductName. This is not recommended technique.
|
isDatabaseSupported | public boolean isDatabaseSupported(String databaseProductName)(Code) | | Returns true if database (specified by databaseProductName) is
supported by system. Does not throw exception if it doesn't.
|
isDebugMode | public boolean isDebugMode()(Code) | | Returns debug-mode flag
|
isDriverSupported | public boolean isDriverSupported(String driverName)(Code) | | Returns true if driver (specified by driverName) is
supported by system. Does not throw exception if it doesn't.
|
setDebugMode | public void setDebugMode(boolean mode)(Code) | | Sets debug-mode flag
|
supportedDatabases | public Set supportedDatabases()(Code) | | Returns array of database products supported by system.
It returns string array only, if you need a Specification instance, use
appropriate createSpecification method.
|
supportedDrivers | public Set supportedDrivers()(Code) | | Returns array of driver products supported by system.
It returns string array only, if you need a Specification instance, use
appropriate createDriverSpecification method.
|
|
|