Class 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 class java.rmi.server.RemoteObject

        ref
    • 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>
      T
      createObject​(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.RemoteServer

        getClientHost, getLog, setLog
      • Methods inherited from class java.rmi.server.RemoteObject

        equals, getRef, hashCode, toString, toStub
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface de.willuhn.datasource.Service

        isStartable, isStarted, start, stop
    • 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 interface de.willuhn.datasource.Service
        Overrides:
        getName in class de.willuhn.datasource.db.DBServiceImpl
        Throws:
        java.rmi.RemoteException
        See Also:
        Service.getName()
      • getAutoCommit

        protected boolean getAutoCommit()
                                 throws java.rmi.RemoteException
        Overrides:
        getAutoCommit in class de.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 class de.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 class de.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 class de.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 class de.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 interface HBCIDBService
        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 class de.willuhn.datasource.db.DBServiceImpl
        Throws:
        java.rmi.RemoteException
        See Also:
        DBServiceImpl.getConnection()
      • 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 interface de.willuhn.datasource.rmi.DBService
        Overrides:
        createList in class de.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 interface de.willuhn.datasource.rmi.DBService
        Overrides:
        createObject in class de.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 interface de.willuhn.datasource.rmi.DBService
        Overrides:
        execute in class de.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 interface HBCIDBService
        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 interface HBCIDBService
        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 class de.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 class de.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 class de.willuhn.datasource.db.DBServiceImpl
        Throws:
        java.rmi.RemoteException
        See Also:
        DBServiceImpl.getTransactionIsolationLevel()