org.salespointframework.core.data.database
Class JavaDBEmbeddedConnection

java.lang.Object
  extended by org.salespointframework.core.data.database.AbstractJavaDBConnection
      extended by org.salespointframework.core.data.database.JavaDBEmbeddedConnection
All Implemented Interfaces:
DatabaseConnection
Direct Known Subclasses:
DefaultDatabaseConnection

public class JavaDBEmbeddedConnection
extends AbstractJavaDBConnection

DatabaseConnection implementation for an embedded javadb connection

Since:
4.0
Author:
Thomas Kissinger

Nested Class Summary
 
Nested classes/interfaces inherited from class org.salespointframework.core.data.database.AbstractJavaDBConnection
AbstractJavaDBConnection.JavaDBConfigurationDialog, AbstractJavaDBConnection.JavaDBConfigurationFS
 
Field Summary
 
Fields inherited from class org.salespointframework.core.data.database.AbstractJavaDBConnection
askpass, cmds, description, imageFilename, name, params, pass, target, tmpPass, typeMap, user
 
Constructor Summary
JavaDBEmbeddedConnection()
          Default constructor
 
Method Summary
 void configure(java.awt.Window owner)
          opens up the configuration window
 java.util.Properties getConnectionProperties()
          build connection properties based on current config
 java.lang.String getConnectionString()
          build connection string based on current config
 boolean loadDriver()
          load database driver (org.apache.derby.jdbc.EmbeddedDriver)
 void onClose()
          explicitly shutdown the database after close. needed for derby databases
 
Methods inherited from class org.salespointframework.core.data.database.AbstractJavaDBConnection
beforeConnect, doAssignmentFixing, getDescription, getImage, getName, getSpecialCommands, getTableColumns, getTables, getTypeMapping, handleCreateTableException, onConnected, promptPassword, recover, save, supportsAutoGeneratedKeys
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaDBEmbeddedConnection

public JavaDBEmbeddedConnection()
Default constructor

Method Detail

configure

public void configure(java.awt.Window owner)
opens up the configuration window

Specified by:
configure in interface DatabaseConnection
Specified by:
configure in class AbstractJavaDBConnection
Parameters:
owner - owning window

loadDriver

public boolean loadDriver()
load database driver (org.apache.derby.jdbc.EmbeddedDriver)

Specified by:
loadDriver in interface DatabaseConnection
Specified by:
loadDriver in class AbstractJavaDBConnection
Returns:
true on success

getConnectionString

public java.lang.String getConnectionString()
build connection string based on current config

Specified by:
getConnectionString in interface DatabaseConnection
Overrides:
getConnectionString in class AbstractJavaDBConnection
Returns:
"jdbc:derby:"
See Also:
DriverManager.getConnection(String, Properties)

getConnectionProperties

public java.util.Properties getConnectionProperties()
build connection properties based on current config

Specified by:
getConnectionProperties in interface DatabaseConnection
Overrides:
getConnectionProperties in class AbstractJavaDBConnection
Returns:
list of properties
See Also:
DriverManager.getConnection(String, Properties)

onClose

public void onClose()
explicitly shutdown the database after close. needed for derby databases

Specified by:
onClose in interface DatabaseConnection
Specified by:
onClose in class AbstractJavaDBConnection