> Inhalt: JavaScout Base-System (JSBS)

JSBS_Country_BOS_Set – Server-seitige Klasse für ein Set von Business-Object zur Abbildung eines Landes

* Bitte beachten Sie die Hinweise und Bestimmungen bezüglich Urheberrecht, Haftungsausschluß und geschützte Marken oder Warenzeichen die für dieses Web-Dokument und möglicherweise auch für 'verlinkte' Dokumente gelten.

  • Der Betreiber dieser Web-Site (www.javascout.biz) ist nicht verantwortlich für den Inhalt von Web-Sites, die innerhalb dieses Web-Dokumentes oder anderer Dokumente von www.javascout.biz verlinkt sind.

  • Wenn dieses Web-Dokument oder andere Dokumente dieser Web-Site (www.javascout.biz) Rechte von Ihnen verletzen, oder sie glauben, dass Rechte Anderer (Dritter Personen) dadurch verletzt werden, informieren Sie bitte den Betreiber dieser Web-Site.
    Eine E-Mail können Sie ganz einfach durch Anklicken des Symbols oder Textes im Frame rechts oben senden.

Dieses Dokument drucken.

 Letzte Bearbeitung dieses  Dokuments:
2011-11-29

Inhaltsverzeichnis

Code 
Erklärungen und Anwendungsbeispiele 
Verwandte Dokumentation
 

Code

package js_base.bos;
/*
 *  de: Package mit Klassen für den Zugriff auf Datenbanken.
 *  en: Package with classes to access databases. */

import
java.sql.*;
/*
 *  de: Package mit den Klassen für BO (Business-Objects) und allgemeinen Status-Codes.
 *  en: Package with the classes for BO (Business-Objects) and common status-codes. */

import
js_base.bo.*;
/*
 *  de: Package mit den Klassen für das DBA- (DataBase-Access-) Object.
 *  en: Package with the classes for the DBA- (DataBase-Access-) object. */

import
js_base.dba.*;
/*
 *  de: 
 *  JSBS-Package und Klasse mit der Daten-Struktur mit den minimal notwendigen Parametern.
 *  en: 
 *  JSBS-package and class with the data-structure containing the minimum set of parameters. */

import
js_base.structures.JSBS_MinimalParameters;

/**
 *
 * @author kurt(at)javascout[biz]
 * @date 2011-09-23
 *
 * @description
 *  de:
 *  Server-seitiger Teil des Sets mit Business Objects für das 'Country' / Land.
 *  
 *  Eine Beschreibung der Variablen und des Anwender-bekannten Schlüssels finden Sie in der
 *  geerbten Generellen BO-Klasse.
 
 *  
 *  en:

 *  Server-Side Derivation of a set with Business Objects for the 'Country'.
 *
 *  For the variables and the user-known key please refer to the inherited BO-class.
 *
 * @change-log
 * when         who               why
 * --------------------------------------------------------
 *
 */

public class JSBS_Country_BOS_Set extends JSBS_Country_BO_Set {
/*
 * VARIABLE / VARIABLES.
 * -------------------- */

/*
 * de:
 * Minimales Set von Parameter mit Informationen über Anwender, Arbeitsplatz
 * und Datum des Client von dem die Datenbank-Operation angefordert wurde.
 * Verwendet wird der Anwender-Name und das Arbeitsdatum des Arbeitsplatzes auf
 * dem das Client-Programm ausgeführt wird.
 * Das Datum des Client-Programms kann unterschiedlich zum System-Datum sein.
 * en:
 * Minimal Parameters containing user-, workstation- and date-information from
 * where the request for the database-operation originated.
 * Used is the user-name and the date the workstation is set to.
 * The date of the workstation might be different of the system-date. */
    private JSBS_MinimalParameters structJSBS_MinimalParameters = null;
/*
 * de:
 * Referenz zur bestehenden Verbindung zur Datenbank.
 * Dieser Wert muss von der aufrufenden Methode als Parameter übergeben werden
 * wenn diese Klasse 'konstruiert' wird.
 * en:
 * Reference to the established connection to the database.
 * This value has to be passed by the calling method when this class is constructed. */

    private Connection structDBCon = null;
/*
 * de:
 * Merker ob das Objekt dieser Klasse durch ein BOC (Client-Side-Klasse eines Business Object)
 * oder durch ein EJB (Enterprise Java Bean) konstruiert wurde.
 * Diese Information wird benötigt wenn ein 'Commit' oder 'Rollback' ausgeführt werden soll.
 * 'Commit' und 'Rollback' werden nur in den Objekten ausgeführt die direkt von einem BOC oder EJB
 * konstruiert wurden – nicht in Objekten, die von einem anderen BOS konstruiert wurden.
 * en:
 * Flag if the object of this class was constructed by a BOC (Client-Side-class of a Business Object)
 * or by a EJB (Enterprise Java Bean).
 * This Information is needed when a 'Commit' or a 'Rollback' has to be performed.
 * 'Commit' and 'Rollback' are only done in objects that were constructed by BOC or EJB -
 * not in objects that were constructed by another BOS. */
    private boolean bolObjectConstructedByBOC_or_EJB;
/*
 * --------------------
 * de:
 * CONSTRUCTOR
 * der verwendet wird wenn eine bestehende (und geöffnete!) Verbindung zur Datenbank
 * (Connection) als Parameter übergeben wird.
 * en:
 * CONSTRUCTOR
 * when an existing (and open!) Connection to the database-system is passed. */
    
public JSBS_Country_BOS_Set(JSBS_MinimalParameters parmMinParm,
                                Connection parmDBCon) {
/* 
 * de:
 * Aufrufen der Methode, die das Übernehmen der Parameter in die Variable dieser
 * Klasse ausführt.
 * en:
 * Call the method written to do the transfer of the parameters to the variables
 * of this class. */
     constructionWithDBConnection(parmMinParm, parmDBCon);
/* 
 * de:
 * Setzen des Merkers dass das Objekt
nicht von einem BOC oder EJB konstruiert wurde.
 * Überlegung zu der Entscheidung, den Wert auf 'false' zu setzen – auch wenn das unlogisch scheinen mag:

 
 * + Wenn dieses BOS-Objekt innerhalb eines anderen BOS konstruiert wird, ist es zeitsparend und
 *   einfacher verständlich, diese 'Constructor' Methode ohne weiteren Parameter aufzurufen.

 *   Mit dem folgenden Kommando wird jenes Flag gesetzt, das ein zu frühes Ausführen eines 'commit' oder
 *   'rollback' innerhalb einer Transaktion verhindert.
 * + Wenn dieses BOS-Objekt innerhalb eines BOC oder EJB konstruiert wird, dann ist zu erwarten, dass
 *   das BOC oder EJB von einem Design-Pattern (Muster) kopiert wurde.
 *   In dem Design-Pattern ist schon der Aufruf des passenden 'Constructors' mit dieser Variable als
 *   Parameter enthalten und damit wird die hier codierte 'Constructor'-Methode nicht aufgerufen.

 
 * en:
 * Set the flag signalling that the object was not constructed by a BOC or EJB.

 
 * Consideration for the decision to set the value to 'false' – even if that seems not to be logically well-founded:
 * + When this BOS-object is constructed within another BOS it saves time and is easier to understand to call this

 *   method without a further parameter.
 *   The following code sets the flag to prevent a too early 'commit' or 'rollback' within a transaction.
 * + If this BOS was constructed within a BOC or EJB, then it can be expected, that the constructing BOC
 *   or EJB has been copied from a design-pattern.
 *   This design-pattern already incorporates the call of the 'fitting' constructor with this variable
 *   as a parameter – therefore this constructor-method is not called. */
      bolObjectConstructedByBOC_or_EJB = false;
    }
/*
 * --------------------
 * de:
 * CONSTRUCTOR
 * der verwendet wird wenn eine bestehende (und geöffnete!) Verbindung zur Datenbank
 * (Connection) als Parameter übergeben wird.
 * In den Parametern wird auch übergeben, ob das Objekt dieser Klasse durch ein BOC oder EJB
 * konstruiert wird.
 * en:
 * CONSTRUCTOR
 * when an existing (and open!) Connection to the database-system is passed.
 * There is a parameter signalling that this object is constructed by a BOC or EJB, too. */
    
public JSBS_Country_BOS_Set(JSBS_MinimalParameters parmMinParm,
                                Connection parmDBCon,
                                
boolean parmObjectConstructedByBOC_or_EJB) {
/* 
 * de: Aufrufen der Methode, die das Kopieren der Parameter ausführt.
 * en: Call the method written to do the copying of the parameters. */
     constructionWithDBConnection(parmMinParm, parmDBCon);
/* 
 
* de: Übernehmen des Werts des Parameters in den Merker.
 * en: Transfer the value from the parameter into the flag
. */
      bolObjectConstructedByBOC_or_EJB = parmObjectConstructedByBOC_or_EJB;
    }
/*
 * --------------------

 
* de:
 
* METHODE zum Kopieren der Werte, die in den Parametern der 'Constructors'
 
* übergeben wurden in die Variablen dieses Objekts.
 
* en:
 * METHOD to copy the values that were passed in the parameters of the 'constructors'

 
* into the variables of this Object. */
    
private void constructionWithDBConnection(
                                JSBS_MinimalParameters parmMinParm,
                                Connection parmDBConnection) {

      structJSBS_MinimalParameters = new JSBS_MinimalParameters(parmMinParm);
      
structDBCon = parmDBConnection;
    }
/*
 * --------------------
 * de:

 * METHODE um die Änderungen, die mit dieser Datenbank-Verbindung gemacht wurden,
 * als 'gültig' zu markieren (commit).
 * Das 'commit' wird nur ausgeführt, wenn das Objekt durch ein BOC oder EJB konstruiert
 * wurde; d.h. der entsprechende Parameter im 'Constructor' übergeben wurde.

 * Diese Regel ist eine Konvention damit auch innerhalb eines BOS-Objekts wieder
 * BOS-Objekte konstruiert werden können. In diesen Objekten wird aber kein 'commit' oder
 * 'rollback' ausgeführt.
 * en:
 * METHOD to 'commit' the changes made with this database-connection.
 * The commit is only done if the object was constructed by a BOC or EJB;
 * i.e. the adjacent parameter was passed in the 'constructor'.
 * This rule is a convention that allows to 'construct' BOS objects within
 * BOS-objects. Within these BOS-objects a 'commit' or 'rollback' is not executed. */
    
private void commitDBConnection() {
/* 
 * de:
 * Wenn dieses BOS-Objekt nicht in einem BOC oder EJB konstruiert wurde, dann wird diese
 * Methode hier beendet weil das commit in einer 'darüber liegenden' Methode ausgeführt wird.
 * en:
 * If this BOS-object has not been constructed within a BOC or EJB, this method will end here.
 * The commit will be performed in a method 'above'.. */
      if (! bolObjectConstructedByBOC_or_EJB) return;
/* 
 * de:
 * 'Commit' innerhalb einer try/catch-Logik ausführen damit ein eventueller Fehler beim
 * 'commit' abgefangen werden kann.
 * en:
 * Run the 'commit' within the try/catch-logic to be able to handle a potential error. */
      try {
/* 
 * de:
 * Prüfen ob die Verbindung zur Datenbank im 'AutoCommit' Modus geöffnet wurde. Dann ist ein
 * explizites Commit nicht notwendig.
 * Ein Beenden der Methode bei 'autocommit' verbessert die Performanz.
 * en:
 * Verify if the DB-connection was not opened as 'autocommit'.
 * In that case a commit is not needed
 * Ending the method when 'autocommit' was chosen enhances the performance. */
        if (! structDBCon.getAutoCommit()) structDBCon.commit();
      }
      
catch (SQLException SQLExc) {
/* 
 * de:
 * Fehler im Datenbank-System während des 'commit';
 * Fehler an die aufrufende Methode zurück liefern.
 * en:
 * Error of the database-system during 'commit'; report the error to the calling method. */

        
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
        
StatusMsg = SQLExc.getMessage();
/* 
 * de: Um auf der sicheren Seite zu sein zusätzlich ein 'rollback' ausführen.
 * en: To be on the save side: perform a 'rollback'. */

        rollbackDBConnection();
      }

    }
/*
 * --------------------
 * de:

 * METHODE um die Änderungen, die mit dieser Datenbank-Verbindung gemacht wurden,
 * 'rückgängig' zu machen (rollback); d.h. die Änderungen werden nicht gültig.
 * Das 'rollback' wird nur ausgeführt, wenn das Objekt durch ein BOC oder EJB konstruiert
 * wurde; d.h. der entsprechende Parameter im 'Constructor' übergeben wurde.

 * Diese Regel ist eine Konvention damit auch innerhalb eines BOS-Objekts wieder
 * BOS-Objekte konstruiert werden können. In diesen Objekten wird aber kein 'commit' oder
 * 'rollback' ausgeführt.
 * Generell wäre ein 'rollback' nicht notwendig weil auf ein Set von Business Objects
 * keine Veränderung ausgeführt wird.
 * Durch Fehler in der Methode die diese Klasse konstruiert kann es aber vorkommen, dass
 * die 'Connection' zur Datenbank nicht mit 'autocommit' geöffnet wurde und dann tritt bei
 * verschiedenen DB-Systemen ein Fehler auf wenn kein 'commit' oder 'rollback' ausgeführt
 * wird bevor die 'Connection' zur Datenbank wieder beendet wird.
 * Der Code in dieser Methode ist ein 'Sicherheitsnetz' um den Zugriff auf die DB auf
 * jeden Fall korrekt zu beenden.
 * en:
 * METHOD to 'rollback' the changes made with this database-connection.
 * The rollback is only done if the object was constructed by a BOC or EJB;
 * i.e. the adjacent parameter was passed in the 'constructor'.
 * This rule is a convention that allows to 'construct' BOS objects within
 * BOS-objects. Within these BOS-objects a 'commit' or 'rollback' is not executed.
 * Generally, a 'roolback' would not be necessary as there are no changes made
 * toward a set of business objects.
 * As a faulty programming might happen in the method that constructs this class,
 * there might be that the 'connection' to the database was not opened with 'autocommit'.
 * In that case, an error might be signalled by some database-systems when the
 * 'connection' to the database ends without a previous 'commit' or 'rollback'.
 * The code of this method is a 'safety-net' to secure a correct end of the
 * database-connection in any case. */
    
private void rollbackDBConnection() {
/* 
 * de:
 * Wenn dieses BOS-Objekt nicht in einem BOC oder EJB konstruiert wurde, dann wird diese
 * Methode hier beendet.
 * en:
 * If this BOS-object has not been constructed within a BOC or EJB, this method will end here. */
      if (! bolObjectConstructedByBOC_or_EJB) return;
/* 
 * de:
 * 'Rollback' innerhalb einer try/catch-Logik ausführen damit ein eventueller Fehler beim
 * 'Rollback' abgefangen werden kann.
 * en:
 * Run the 'rollback' within the try/catch-logic to be able to handle a potential error. */
      try {
/* 
 * de:
 * Prüfen ob die Verbindung zur Datenbank im 'AutoCommit' Modus geöffnet wurde. Dann ist ein
 * explizites Commit nicht notwendig.
 * Ein Beenden der Methode bei 'autocommit' verbessert die Performanz.
 * en:
 * Verify if the DB-connection was not opened as 'autocommit'.
 * In that case a commit is not needed
 * Ending the method when 'autocommit' was chosen enhances the performance. */
        if (! structDBCon.getAutoCommit()) structDBCon.rollback();
      }
      
catch (SQLException SQLExc) {
/* 
 * de:
 * Fehler im Datenbank-System während des 'rollback';
 * Fehler an die aufrufende Methode zurück liefern.
 * en:
 * Error of the database-system during 'rollback'; report the error to the calling method. */

        
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
        
StatusMsg = SQLExc.getMessage();
      }

    }
/*
 * --------------------
 * de:
 * METHODE zum Übernehmen der Variablen-Werte vom DBA- (DataBase-Access-) Objekt, das diesem
 * diesem Business Objekt zugeordnet ist.
 * en:
 * METHOD to transfer the values of the variables from the Data-Base-Access (DBA) Object
 * that is assigned to this Business Object. */
    
private void getDBAAttributes(JSBS_Parameter_DBA_Set parmJSBS_Parameter_DBA_Set) {
/* 
 * de:

 * Prüfen, ob der übergebene Parameter nicht 'null' ist um spätere Fehler zu verhindern.
 * en:
 * Verify if the passed parameter is not 'null' to avoid errors later. */

      if (parmJSBS_Parameter_DBA_Set == null) return;
/* 
 * de:

 * Prüfen, ob das DBA-Set leer ist; in diesem Fall einen 'Not Found' Status zurückliefern.
 * en:
 * Verify if the DBA-Set is empty; return a 'Not Found' Status in that case. */

      int intDBAVectorSize = parmJSBS_Parameter_DBA_Set.vecRecordSet.size();
      if (intDBAVectorSize < 1) {
        
StatusCode = JSBS_BO.CONST_NOT_FOUND;
        
return;
      }
/* 
 * de:
 * Eine Variable für das ein DBA-Objekt (aus der Liste) definieren.
 * Durch ein eigenes DBA-Objekt ist das Übertragen der Werte aus dem DBA-Set auf das BO-Set

 * leichter zu verstehen
.
 * en:
 * Define a variable for the DBA-object (out of the list).
 * By defining this DBA-object the algorithm to transfer the values from the DBA-set to the

 * BO-Set is easier to understand
. */
      JSBS_Parameter_DBA locJSBS_Parameter_DBA;
/* 
 * de:
 * In einer for-Schleife jedes DBA aus dem DBA-Set auslesen, ein passendes BO 'konstruieren',
 * die Werte aus dem DBA auf das BO übertragen und das BO in die Liste dieses BOS-Set einfügen.
 * en:
 * Use a for-loop to read each individual DBA out of the DBA-Set, 'construct' a fitting BO,
 * transfer the values from the DBA to the BO and insert the BO into the list of this BOS-Set. */

      int intDBAVectorIndex;
      for (intDBAVectorIndex = 0; intDBAVectorIndex < intDBAVectorSize; intDBAVectorIndex++) {
/* de: Einzelnes DBA-Object aus dem DBA-Set auslesen.
 * en: Read a single DBA-object out of the DBA-Set.*/

        locJSBS_Parameter_DBA = (JSBS_Parameter_DBA)
          parmJSBS_Parameter_DBA_Set.vecRecordSet.elementAt(intDBAVectorIndex);
/* de:
 * Neues BO erstellen und die Werte des DBA übernehmen.
 * Zum Übernehmen der Werte wird die Methode des BO verwendet.
 * en:
 * Create a new BO and transfer the values of the DBA.
 * To transfer the values, the method of the BO is used.*/

        JSBS_Country_BO locBO = new JSBS_Country_BO();
        locBO.getDBAAttributes(locJSBS_Parameter_DBA);
/* de: BO mit den übernommenen Werten in die Liste dieses BOS-Set einfügen.
 * en: Insert the BO with the transferred values to the list of this BOS-Set .*/

          vecRecordSet.addElement(locBO);
      }
    }
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller Datensätze (BO) für einen gegebenen ObjectID.
 * Diese Methode wird zum Anzeigen von Veränderungen (History) des BO und zum Abgleichen der
 * Daten bei einer 'MobileClient' Version verwendet.
 * Weiters wird damit beim 'deaktivieren' des BO festgestellt, welche Datensätze (BO) noch über
 * das aktuelle Datum hinaus gültig sind.
 * en:
 * METHOD to select all datasets (BO) for a given ObjectID.
 * This Method is used to display changes (history) of the BO and to synchronize data at a
 * 'MobileClient' version.
 * When the BO is 'deactivated', this set is checked for datasets (BO) that are valid after the
 * actual date. */
    
public synchronized void selectAllByObjectID(double parmObjectID) {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectAllByObjectID(
              
structDBCon, parmObjectID);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access ended without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least one dataset exists and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller einer durch den Parameter 'parmNumberOfRecords' festgelegten
 * Anzahl von Datensätzen deren Wert im Attribut 'ChangedAt' gleich oder kleiner ist als
 * der im Parameter 'parmBeginTimestamp' übergebene Wert.
 * Die Datensätze sind absteigend nach ihrem Wert im Attribut 'ChangedAt' sortiert.
 * Diese Methode wird gebraucht wenn bei der Version 'MobileClient' die Daten auf einem
 * mobilen Client mit den Daten des Servers synchronisiert werden müssen.
 * 
 * en:
 * METHOD to select a defined number of datasets which values in the attribute 'ChangedAt' are
 * equal or less than the value passed in the parameter 'parmBeginTimestamp'.
 * The datasets are sorted descending after the values in the attribute 'ChangedAt'.
 * This method is needed to synchronize the data of a 'MobileClient' with the data at the server.
 * the actual date. */
    
public synchronized void selectAllByChangedAt(Timestamp parmBeginTimestamp, int parmNumberOfRecords) {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectAllByChangedAt(
structDBCon,
             
JSBS_Country_BO.CONST_PARAMETER_NAME, parmBeginTimestamp, parmNumberOfRecords);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access endet without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least one dataset exists and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller zum aktuellen Zeitpunkt gültigen Datensätze (BO).
 * en:
 * METHOD to select all datasets (BO) that are valid at the actual date. */
    
public synchronized void selectAllValid() {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectByParameterName(
              
structDBCon, structJSBS_MinimalParameters, JSBS_Country_BO.CONST_PARAMETER_NAME);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access ended without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least oen dataset exist and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller zum aktuellen Zeitpunkt und in der Zukunft gültigen Datensätze (BO)
 * für den als Parameter übergebenen Landes-Code.
 * en:
 * METHOD to select all datasets (BO) for the Country-code passed as parameter and that are valid at
 * the actual date and in the future. */
    
public synchronized void selectValidAndFutureByISOCountryCode(String parmISOCountryCode) {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectValidAndFutureByParameterNameAndValue_01(
              
structDBCon, structJSBS_MinimalParameters,
              
JSBS_Country_BO.CONST_PARAMETER_NAME, parmISOCountryCode);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access ended without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least one dataset exists and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller zum aktuellen Zeitpunkt gültigen Datensätze (BO) mit
 * für den als Parameter übergebenen Landes-Code.
 * en:
 * METHOD to select all datasets (BO) for the Country-code passed as parameter and are valid
 * at the actual date. */
    
public synchronized void selectByISOCountryCode(String parmISOCountryCode) {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectByValue01(
              
structDBCon, structJSBS_MinimalParameters,
              
JSBS_Country_BO.CONST_PARAMETER_NAME, parmISOCountryCode);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access ended without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least one dataset exists and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller zum aktuellen Zeitpunkt und in der Zukunft gültigen Datensätze (BO)
 * für den als Parameter übergebenen Sprach-Code für die Bezeichnung des Landes.
 * en:
 * METHOD to select all datasets (BO) for the language-code for the country-Name passed as parameter

 *
and that are valid at the actual date and in the future. */
    
public synchronized void selectValidAndFutureByLanguageCodeForLabelling(String parmLanguageCodeForLabelling) {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectValidAndFutureByParameterNameAndValue02(
              
structDBCon, structJSBS_MinimalParameters,
              
JSBS_Country_BO.CONST_PARAMETER_NAME,
parmLanguageCodeForLabelling);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access ended without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least one dataset exists and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
/*
 * --------------------
 * de:
 * METHODE zum Selektieren aller zum aktuellen Zeitpunkt gültigen Datensätze (BO) mit
 * für den als Parameter übergebenen Sprach-Code für die Landes-Bezeichnung.
 * en:
 * METHOD to select all datasets (BO) for the language-code for the country-name passed

 *
as parameter and are validat the actual date. */
    
public synchronized void selectByLanguageCodeForLabelling(String parmLanguageCodeForLabelling) {
/* 
 * de: Status-Variablen auf 'OK' setzen.
 * en: Reset the Status-variables to a state of OK. */
      
this.StatusCode = JSBS_BO.CONST_OK;
      
this.StatusMsg = "";
/* 
 * de: DBA-Set für den Zugriff auf die Datenbank-Tabelle 'konstruieren'.
 * en: 'Construct' the DBA-set for the access to the database-table. */
      
JSBS_Parameter_DBA_Set locJSBS_Parameter_DBA_Set = new JSBS_Parameter_DBA_Set();
/* 
 * de: Datenbank-Operation ausführen.
 * en: Perform the database-operation. */
      
locJSBS_Parameter_DBA_Set.selectByValue02(
              
structDBCon, structJSBS_MinimalParameters,
              
JSBS_Country_BO.CONST_PARAMETER_NAME,
parmLanguageCodeForLabelling);
/* 
 * de:
 * Über die Länge des Textes mit einer eventuellen Fehler-Nachricht prüfen, ob die
 * Datenbank-Abfrage fehlerfrei beendet wurde.
 * en:
 * Use the text with a possible error-message to verify if the database-access ended without
 * an error. */
      
if (locJSBS_Parameter_DBA_Set.ErrorMsg.length() < 1) {
/* 
 * de:
 * Mindestens ein Datensatz existiert und Lesen war fehlerfrei.
 * Methode aufrufen die die Werte von den DBA auf die BO in der Liste dieses BOS-Set überträgt.
 * en:
 * At least one dataset exists and reading ended without an error.
 * Call the method that transfers the values from the DBA to the BO of the list of this BOS-Set. */
        getDBAAttributes(locJSBS_Parameter_DBA_Set);
/* 
 * de:
 * Methode, die entscheidet ob ein 'Commit' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'commit' is needed, and performing it,
 * and end the method. */
        commitDBConnection();
        
return;
      }
      
else {
/* 
 * de:
 * DBA-Set Objekt meldet einen Fehler.
 * Status-Code setzen und die Fehlermeldung aus dem DBA-Set auf dieses BOS-Set übernehmen.
 * en:
 * DBA-set object reports an error.
 * Set the status-code and transfer the error-message to this BOS-set.
*/
          
StatusCode = JSBS_BO.CONST_DB_SYSTEM_ERROR;
          
StatusMsg = locJSBS_Parameter_DBA_Set.ErrorMsg;
/* 
 * de:
 * Methode, die entscheidet ob ein 'Rollback' auszuführen ist und es wenn notwendig
 * ausführt, aufrufen und Methode beenden.
 * en:
 * Call the method deciding if a 'rollback' is needed, and performing it,
 * and end the method. */
          rollbackDBConnection();
          return;
      }

   
}
}

zum Inhaltsverzeichnis

Erklärungen und Anwendungsbeispiele

Die Methoden dieser Klasse werden nur von Methoden innerhalb des JavaScout Basis-Systems aufgerufen und sind nicht für eine allgemeine Verwendung gedacht.

zum Inhaltsverzeichnis

Verwandte Dokumentation

Dokument

Inhalt



zum Inhaltsverzeichnis