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 void
checkConnection(java.sql.Connection conn)
void
checkConsistency()
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.Object
execute(java.lang.String arg0, java.lang.Object[] arg1, de.willuhn.datasource.rmi.ResultSetExtractor arg2)
int
executeUpdate(java.lang.String query, java.lang.String... params)
Fuehrt ein Update/Delete-Statement durch.protected boolean
getAutoCommit()
protected java.sql.Connection
getConnection()
DBSupport
getDriver()
Liefert den verwendeten Treiber.protected boolean
getInsertWithID()
protected java.lang.String
getJdbcDriver()
protected java.lang.String
getJdbcPassword()
protected java.lang.String
getJdbcUrl()
protected java.lang.String
getJdbcUsername()
java.lang.String
getName()
java.lang.String
getSQLTimestamp(java.lang.String content)
Liefert den Namen der SQL-Funktion, mit der die Datenbank aus einem DATE-Feld einen UNIX-Timestamp macht.protected int
getTransactionIsolationLevel()
void
install()
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.RemoteException
Konstruktor 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:
getName
in interfacede.willuhn.datasource.Service
- Overrides:
getName
in classde.willuhn.datasource.db.DBServiceImpl
- Throws:
java.rmi.RemoteException
- See Also:
Service.getName()
-
getAutoCommit
protected boolean getAutoCommit() throws java.rmi.RemoteException
- Overrides:
getAutoCommit
in classde.willuhn.datasource.db.DBServiceImpl
- Throws:
java.rmi.RemoteException
- See Also:
DBServiceImpl.getAutoCommit()
-
getJdbcDriver
protected java.lang.String getJdbcDriver() throws java.rmi.RemoteException
- Overrides:
getJdbcDriver
in classde.willuhn.datasource.db.DBServiceImpl
- Throws:
java.rmi.RemoteException
- See Also:
DBServiceImpl.getJdbcDriver()
-
getJdbcPassword
protected java.lang.String getJdbcPassword() throws java.rmi.RemoteException
- Overrides:
getJdbcPassword
in classde.willuhn.datasource.db.DBServiceImpl
- Throws:
java.rmi.RemoteException
- See Also:
DBServiceImpl.getJdbcPassword()
-
getJdbcUrl
protected java.lang.String getJdbcUrl() throws java.rmi.RemoteException
- Overrides:
getJdbcUrl
in classde.willuhn.datasource.db.DBServiceImpl
- Throws:
java.rmi.RemoteException
- See Also:
DBServiceImpl.getJdbcUrl()
-
getJdbcUsername
protected java.lang.String getJdbcUsername() throws java.rmi.RemoteException
- Overrides:
getJdbcUsername
in classde.willuhn.datasource.db.DBServiceImpl
- Throws:
java.rmi.RemoteException
- See Also:
DBServiceImpl.getJdbcUsername()
-
checkConsistency
public void checkConsistency() throws java.rmi.RemoteException, de.willuhn.util.ApplicationException
Description copied from interface:HBCIDBService
Checkt die Konsistenz der Datenbank und fuehrt bei Bedarf Updates durch.- Specified by:
checkConsistency
in 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:
getConnection
in 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.RemoteException
Description copied from interface:HBCIDBService
Fuehrt ein Update/Delete-Statement durch.- Specified by:
executeUpdate
in 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:
createList
in interfacede.willuhn.datasource.rmi.DBService
- Overrides:
createList
in 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:
createObject
in interfacede.willuhn.datasource.rmi.DBService
- Overrides:
createObject
in 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:
execute
in interfacede.willuhn.datasource.rmi.DBService
- Overrides:
execute
in 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.RemoteException
Description copied from interface:HBCIDBService
Initialisiert/erzeugt die Datenbank.- Specified by:
install
in 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.RemoteException
Description copied from interface:HBCIDBService
Liefert 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:
getSQLTimestamp
in 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:
getInsertWithID
in 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:
checkConnection
in 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:
getTransactionIsolationLevel
in 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:HBCIDBService
Liefert den verwendeten Treiber.- Specified by:
getDriver
in interfaceHBCIDBService
- Returns:
- der Treiber.
- Throws:
java.rmi.RemoteException
- See Also:
HBCIDBService.getDriver()
-
-