Package de.willuhn.jameica.hbci.server
Class HBCIDBServiceImpl
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- de.willuhn.datasource.db.DBServiceImpl
-
- de.willuhn.jameica.hbci.server.HBCIDBServiceImpl
-
- All Implemented Interfaces:
de.willuhn.datasource.rmi.DBService,de.willuhn.datasource.Service,HBCIDBService,java.io.Serializable,java.rmi.Remote
public class HBCIDBServiceImpl extends de.willuhn.datasource.db.DBServiceImpl implements HBCIDBService
- Author:
- willuhn
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface de.willuhn.jameica.hbci.rmi.HBCIDBService
SETTINGS
-
-
Constructor Summary
Constructors Constructor Description HBCIDBServiceImpl()HBCIDBServiceImpl(java.lang.String driverClass)Konstruktor mit expliziter Angabe des Treibers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckConnection(java.sql.Connection conn)voidcheckConsistency()Checkt die Konsistenz der Datenbank und fuehrt bei Bedarf Updates durch.<T extends de.willuhn.datasource.rmi.DBObject>
de.willuhn.datasource.rmi.DBIterator<T>createList(java.lang.Class<? extends de.willuhn.datasource.rmi.DBObject> arg0)<T extends de.willuhn.datasource.rmi.DBObject>
TcreateObject(java.lang.Class<? extends de.willuhn.datasource.rmi.DBObject> arg0, java.lang.String arg1)java.lang.Objectexecute(java.lang.String arg0, java.lang.Object[] arg1, de.willuhn.datasource.rmi.ResultSetExtractor arg2)intexecuteUpdate(java.lang.String query, java.lang.String... params)Fuehrt ein Update/Delete-Statement durch.protected booleangetAutoCommit()protected java.sql.ConnectiongetConnection()DBSupportgetDriver()Liefert den verwendeten Treiber.protected booleangetInsertWithID()protected java.lang.StringgetJdbcDriver()protected java.lang.StringgetJdbcPassword()protected java.lang.StringgetJdbcUrl()protected java.lang.StringgetJdbcUsername()java.lang.StringgetName()java.lang.StringgetSQLTimestamp(java.lang.String content)Liefert den Namen der SQL-Funktion, mit der die Datenbank aus einem DATE-Feld einen UNIX-Timestamp macht.protected intgetTransactionIsolationLevel()voidinstall()Initialisiert/erzeugt die Datenbank.-
Methods inherited from class de.willuhn.datasource.db.DBServiceImpl
isStartable, isStarted, setClassFinder, setClassloader, start, stop
-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
-
-
-
-
Constructor Detail
-
HBCIDBServiceImpl
public HBCIDBServiceImpl() throws java.rmi.RemoteException- Throws:
java.rmi.RemoteException
-
HBCIDBServiceImpl
public HBCIDBServiceImpl(java.lang.String driverClass) throws java.rmi.RemoteExceptionKonstruktor mit expliziter Angabe des Treibers.- Parameters:
driverClass- der zu verwendende Treiber.- Throws:
java.rmi.RemoteException
-
-
Method Detail
-
getName
public java.lang.String getName() throws java.rmi.RemoteException- Specified by:
getNamein interfacede.willuhn.datasource.Service- Overrides:
getNamein classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
Service.getName()
-
getAutoCommit
protected boolean getAutoCommit() throws java.rmi.RemoteException- Overrides:
getAutoCommitin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getAutoCommit()
-
getJdbcDriver
protected java.lang.String getJdbcDriver() throws java.rmi.RemoteException- Overrides:
getJdbcDriverin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getJdbcDriver()
-
getJdbcPassword
protected java.lang.String getJdbcPassword() throws java.rmi.RemoteException- Overrides:
getJdbcPasswordin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getJdbcPassword()
-
getJdbcUrl
protected java.lang.String getJdbcUrl() throws java.rmi.RemoteException- Overrides:
getJdbcUrlin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getJdbcUrl()
-
getJdbcUsername
protected java.lang.String getJdbcUsername() throws java.rmi.RemoteException- Overrides:
getJdbcUsernamein classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getJdbcUsername()
-
checkConsistency
public void checkConsistency() throws java.rmi.RemoteException, de.willuhn.util.ApplicationExceptionDescription copied from interface:HBCIDBServiceCheckt die Konsistenz der Datenbank und fuehrt bei Bedarf Updates durch.- Specified by:
checkConsistencyin interfaceHBCIDBService- Throws:
java.rmi.RemoteException- Wenn es beim Pruefen der Datenbank-Konsistenz zu einem Fehler kam.de.willuhn.util.ApplicationException- wenn die Datenbank-Konsistenz nicht gewaehrleistet ist.- See Also:
HBCIDBService.checkConsistency()
-
getConnection
protected java.sql.Connection getConnection() throws java.rmi.RemoteException- Overrides:
getConnectionin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getConnection()
-
executeUpdate
public int executeUpdate(java.lang.String query, java.lang.String... params) throws java.rmi.RemoteExceptionDescription copied from interface:HBCIDBServiceFuehrt ein Update/Delete-Statement durch.- Specified by:
executeUpdatein interfaceHBCIDBService- Parameters:
query- das Query.params- die Parameter.- Returns:
- die Anzahl der betroffenen Datensaetze.
- Throws:
java.rmi.RemoteException- See Also:
HBCIDBService.executeUpdate(java.lang.String, java.lang.String[])
-
createList
public <T extends de.willuhn.datasource.rmi.DBObject> de.willuhn.datasource.rmi.DBIterator<T> createList(java.lang.Class<? extends de.willuhn.datasource.rmi.DBObject> arg0) throws java.rmi.RemoteException- Specified by:
createListin interfacede.willuhn.datasource.rmi.DBService- Overrides:
createListin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.createList(java.lang.Class)
-
createObject
public <T extends de.willuhn.datasource.rmi.DBObject> T createObject(java.lang.Class<? extends de.willuhn.datasource.rmi.DBObject> arg0, java.lang.String arg1) throws java.rmi.RemoteException- Specified by:
createObjectin interfacede.willuhn.datasource.rmi.DBService- Overrides:
createObjectin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.createObject(java.lang.Class, java.lang.String)
-
execute
public java.lang.Object execute(java.lang.String arg0, java.lang.Object[] arg1, de.willuhn.datasource.rmi.ResultSetExtractor arg2) throws java.rmi.RemoteException- Specified by:
executein interfacede.willuhn.datasource.rmi.DBService- Overrides:
executein classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.execute(java.lang.String, java.lang.Object[], de.willuhn.datasource.rmi.ResultSetExtractor)
-
install
public void install() throws java.rmi.RemoteExceptionDescription copied from interface:HBCIDBServiceInitialisiert/erzeugt die Datenbank.- Specified by:
installin interfaceHBCIDBService- Throws:
java.rmi.RemoteException- Wenn beim Initialisieren ein Fehler auftrat.- See Also:
HBCIDBService.install()
-
getSQLTimestamp
public java.lang.String getSQLTimestamp(java.lang.String content) throws java.rmi.RemoteExceptionDescription copied from interface:HBCIDBServiceLiefert den Namen der SQL-Funktion, mit der die Datenbank aus einem DATE-Feld einen UNIX-Timestamp macht. Bei MySQL ist das z.Bsp. "UNIX_TIMESTAMP".- Specified by:
getSQLTimestampin interfaceHBCIDBService- Parameters:
content- der Feld-Name.- Returns:
- Name der SQL-Funktion samt Parameter. Also zum Beispiel "TONUMBER(datum)".
- Throws:
java.rmi.RemoteException- See Also:
HBCIDBService.getSQLTimestamp(java.lang.String)
-
getInsertWithID
protected boolean getInsertWithID() throws java.rmi.RemoteException- Overrides:
getInsertWithIDin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getInsertWithID()
-
checkConnection
protected void checkConnection(java.sql.Connection conn) throws java.sql.SQLException- Overrides:
checkConnectionin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.sql.SQLException- See Also:
DBServiceImpl.checkConnection(java.sql.Connection)
-
getTransactionIsolationLevel
protected int getTransactionIsolationLevel() throws java.rmi.RemoteException- Overrides:
getTransactionIsolationLevelin classde.willuhn.datasource.db.DBServiceImpl- Throws:
java.rmi.RemoteException- See Also:
DBServiceImpl.getTransactionIsolationLevel()
-
getDriver
public DBSupport getDriver() throws java.rmi.RemoteException
Description copied from interface:HBCIDBServiceLiefert den verwendeten Treiber.- Specified by:
getDriverin interfaceHBCIDBService- Returns:
- der Treiber.
- Throws:
java.rmi.RemoteException- See Also:
HBCIDBService.getDriver()
-
-