> Inhalt: JavaScout Base-System (JSBS)

JSBS_Currency_BO – Generelle Klasse für das Business-Object zur Abbildung einer Währung

* 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-14

Inhaltsverzeichnis

Code 
Erklärungen und Anwendungsbeispiele 
Verwandte Dokumentation
 

Code

package js_base.bo;
/*
 * de:
 * Package mit den Klassen für die Serialization eines Objekts dieser Klasse.
 * Serialization ist notwendig um die Werte des Objektes zwischen einem Java
 * Application Server (JAS) und einem Heavyweight-Client übertragen zu können.
 * en:
 * Package with the classes to serialize an object of this class.
 * Serialization is neccessary to exchange the values of the object between a
 * Java Application Server (JAS) and a Heavyweight-Client. */

import java.io.Serializable;
/*
 * de:
 * Package mit den Klassen für die Bearbeitung von 'BigDecimal'.
 * 'BigDecimal' ermöglicht die Definition von großen Zahlen mit genauen Kommastellen
 * und wird für das kaufmännische Rechnen mit Beträgen verwendet.
 * en:
 * Package with the classes to manipulate 'BigDecimal'.
 * 'BigDecimal' enables the definition of large numbers with exact figures behind
 * the decimal point and is used for mercantile calculation with amounts. */

import java.math.BigDecimal;
/*
 * de:
 * Package mit den DataBase-Access- (DBA-) Klassen für den Zugriff auf Datenbank-Tabellen.
 * en:
 * Package with the DataBase-Access- (DBA-) classes for the access to database-tables. */

import
js_base.dba.*;

/**
 *
 * @author kurt[at]javascout(dot)biz
 * @date 2010-11-01
 *
 * @description
 * de: Business Object (BO) für die 'Currency' (Währung).

 * en: Business Object (BO) for the 'Currency'.
 *
 * de:
 * Die Werte dieses BO definieren eine Währung.
 * Neben dem ISO-Code der Währung und der Bezeichnung wird festgelegt, ob diese Währung.
 * die Leitwährung für die Installation eines Anwendungsprogramms ist.
 * Wenn es nicht die Leitwährung ist, dann ist der Umrechnungskurs zur Leitwährung festgelegt.
 * Weiters enthält dieses BO auch ein Set von Markern, für welche Themenbereiche (z.B.
 * Dokumente an Kunden, Preise von Produkten) diese Währung verwendet werden darf.
 * Zusätzlich kann die Bezeichnung der Währung in verschiedenen Sprachen erfasst werden.
 *
 * Dieses BO benutzt die Datenbanktabelle 'Parameter'.
 * Die Beschreibung der 'virtuellen Tabelle' finden Sie beim Datenmodell für das Anwendungsprogramm
 * HandelsSepp: http://www.javascout.biz/JS_HSepp_DM/de/DM_Parameter_Currency_de.html.
 *
 * Anwender-bekannter-Schlüssel: LeadCurrencyIndicator, CurrencyCode, LanguageCodeForLabelling.
 *
 * en:

 * The values of this BO define a currency.
 * Additional to the ISO-code of the currency and the description, a flag indicates if this currency.
 * is the leading currency for the application-program.
 * If this currency is not the leading currency, then the exchange rates toward the leading currency
 * are defined.
 * Further, the BO contains a set of markers (flags) which permit the restricted usage of the currency
 * only for specified areas (e.g. Documents to customers, prices of products).
 * Additionally, the name of the currency can be kept in differnt languages.

 *
 * This BO uses the database-table 'Parameter'.
 * The description of this 'virtual table' you will find at the data-model for the application-program
 * HandelsSepp: http://www.javascout.biz/JS_HSepp_DM/de/DM_Parameter_Currency_de.html.
 *
 * User-Key: LeadCurrencyIndicator, CurrencyCode, LanguageCodeForLabelling.
 *
 * @change-log
 * when         who               why
 * --------------------------------------------------------
 *
 */

public class JSBS_Currency_BO extends JSBS_BO implements Serializable {
/*
 * de:
 * Identifikation dieses BO innerhalb der DB-Tabelle 'Parameter'; unter diesem 'ParameterName'
 * werden die Werte der Attribute der DB-Tabelle eindeutig einer Währung zugeordnet.

 * en:
 * Identifier of this BO within the DB-table 'Parameter'; under this 'ParameterName' the values
 * of the attributes of the DB-table are uniquely assigned to a currency. */
    public static final String CONST_PARAMETER_NAME = "ISOCurrencyCode";
/*
 * VARIABLE diese BO / VARIABLES of this BO.
 * ------------------ */

/*
 * de:
 * ISO-Code dieser Währung.
 * en:

 * ISO-code of this currency. */
    public String ISOCurrencyCode = "";
/*
 * de:
 * ISO-Code der Sprache für die Bezeichnung der Währung im Attribut 'CurrencyName'.
 * en:

 * ISO-Code of the language for the name of the Currency - within the attribute 'CurrencyyName'. */
    public String LanguageCodeForLabelling = "";
/*
 * de:
 * Markierungen für die 'Themenbereiche' in denen die Währung verwendet wird.
 * Der 'Themenbereich' einer einzelnen Markierung ist im Anwendungsprogramm bestimmt.
 * en:

 * Markers (flags) for the 'areas' where this Currency is used,
 * The 'area' of usage of a single marker is defined within the application program. */
    public Boolean Marker01 false;
    public Boolean Marker02 false;
    public Boolean Marker03 false;
    public Boolean Marker04 false;
    public Boolean Marker05 false;
    public Boolean Marker06 false;
    public Boolean Marker07 false;
    public Boolean Marker08 false;
    public Boolean Marker09 false;
    public Boolean Marker10 false;
    public Boolean Marker11 false;
    public Boolean Marker12 false;
    public Boolean Marker13 false;
    public Boolean Marker14 false;
    public Boolean Marker15 false;
    public Boolean Marker16 false;
    public Boolean Marker17 false;
    public Boolean Marker18 false;
    public Boolean Marker19 false;
    public Boolean Marker20 false;
/*
 * de:
 * Indikator ob diese Währung die Leitwährung für das Anwendungsprogramm ist.
 * en:

 * Indicator if this currency is the leading currency for the application-program. */
    public String LeadCurrencyIndicator = CONST_LEADCURRENCY_NO;
/*
 * de:
 * Mögliche Werte zum Unterscheiden ob diese Währung die Leitwährung ist ('L')
 * oder eine andere Währung ('N').
 * en:

 * Possible values to differentiate if this currency is the leading currency ('L')
 * or another currency ('N'). */
    public static final String CONST_LEADCURRENCY_YES = "L";
    public static final String CONST_LEADCURRENCY_NO = "N";
/*
 * de:
 * Bezeichnung dieser Währung; zur leichteren Identifizierung.
 * en:

 * Description of this currency; for an easy identification. */
    public String CurrencyName = "";
/*
 * de:
 * Mittelkurs dieser Währung zur Leitwährung; für die Programm-interne Umrechnung von
 * Währungs-Beträgen.
 * en:

 * Middle rate of this currency toward the leading currency; used for the application-internal
 * conversion of amounts in one currency to another currency. */
    public BigDecimal MiddleRateToLeadCurrency = new BigDecimal(1.00);
/*
 * de:
 * Kaufkurs dieser Währung zur Leitwährung – im Bankwesen als 'Briefkurs' bezeichnet.
 * Nur zur Dokumentation ohne weitere Verwendung im Anwendungsprogramm.
 * en:

 * Buying rate of this currency toward the leading currency.
 * Just for documentation without any usage within the application-program. */
    public BigDecimal BuyingRateToLeadCurrency = new BigDecimal(1.00);
/*
 * de:
 * Verkaufskurs dieser Währung zur Leitwährung – im Bankwesen als 'Geldkurs' bezeichnet.
 * Nur zur Dokumentation ohne weitere Verwendung im Anwendungsprogramm.
 * en:

 * Selling rate of this currency toward the leading currency.
 * Just for documentation without any usage within the application-program. */
    public BigDecimal SellingRateToLeadCurrency = new BigDecimal(1.00);
/*
 * --------------------
 * de:
 * 'Fehler', die bei der Ausführung der Geschäftsregeln auftreten können.

 * en:
 * 'Errors' that may occur during processing the business-rules. */

/*
 * de:
 * Ein Datensatz für eine weitere Sprache soll erstellt werden obwohl noch kein Haupt-Datensatz
 * (Leere Zeichenkette im Attribut 'LanguageCodeForLabelling') für diesen 'ISOCurrencyCode' existiert.

 * en:
 * A dataset for another language should be created although no main-dataset (empty string in the
 * attribute 'LanguageCodeForLabelling') does not already exist for that 'ISOCurrencyCode'. */

    public static final int CONST_ERROR_No_Default_Dataset_For_ISOCurrencyCode = 41;
/*
 * --------------------
 * de:
 * 'Fehler', die das 'Deaktivieren' des BO verhindern.
 * Diese Stati gelten nur für dieses BO.

 * en:
 * 'Errors' that inhibit the 'deactivation' of the BO.
 * Those stati are only valid for this BO. */

/*
 * de:
 * Ein Haupt-Datensatz (Leere Zeichenkette im Attribut 'LanguageCodeForLabelling')
 * darf nicht deaktiviert werden weil noch Bezeichnungen für die Währung in
 * anderen Sprachen existieren.

 * en:
 * A main-dataset (empty string in the attribute 'LanguageCodeForLabelling') may
 * not be deactivated as 'Labels' for this currency in other languages still exist. */

    public static final int CONST_DEACTIVATE_INHIBIT_REASON_AdditionalLanguageLabelling = 61;
/*
 * de:
 * Jene Währung, die als 'LeadingCurrency' definiert ist darf nicht deaktiviert werden
 * weil die Umrechnungskurse anderer Währungen darauf referenzieren.

 * en:
 * The currency defined as 'LeadingCurrency' may not be deactivated as the
 * exchange rates of other currencies refer to this currency. */

    public static final int CONST_DEACTIVATE_INHIBIT_REASON_LeadingCurrency = 62;
/*
 * --------------------
 * de: METHODE zum Kopieren der Werte eines anderen Objekts in dieses Objekt.

 * en: METHOD to copy the values from another object into this object. */
    
public void copyFromJSBS_Currency_BO (JSBS_Currency_BO parmJSBS_Currency_BO) {
/*
 * de:
 * Methode der Superklasse verwenden um die Allgemeinen Attribute (Common Attributes),
 * StatusCode und StatusMsg zu kopieren.
 * en:

 * Use the method of the super-class to copy the Common Attributes,
 * StatusCode and StatusMsg. */
        super.copyFromJSBS_BO(parmJSBS_Currency_BO);
        
ISOCurrencyCode = parmJSBS_Currency_BO.ISOCurrencyCode;
        
LanguageCodeForLabelling = parmJSBS_Currency_BO.LanguageCodeForLabelling;
        
Marker01 = parmJSBS_Currency_BO.Marker01;
        
Marker02 = parmJSBS_Currency_BO.Marker02;
        
Marker03 = parmJSBS_Currency_BO.Marker03;
        
Marker04 = parmJSBS_Currency_BO.Marker04;
        
Marker05 = parmJSBS_Currency_BO.Marker05;
        
Marker06 = parmJSBS_Currency_BO.Marker06;
        
Marker07 = parmJSBS_Currency_BO.Marker07;
        
Marker08 = parmJSBS_Currency_BO.Marker08;
        
Marker09 = parmJSBS_Currency_BO.Marker09;
        
Marker10 = parmJSBS_Currency_BO.Marker10;
        
Marker11 = parmJSBS_Currency_BO.Marker11;
        
Marker12 = parmJSBS_Currency_BO.Marker12;
        
Marker13 = parmJSBS_Currency_BO.Marker13;
        
Marker14 = parmJSBS_Currency_BO.Marker14;
        
Marker15 = parmJSBS_Currency_BO.Marker15;
        
Marker16 = parmJSBS_Currency_BO.Marker16;
        
Marker17 = parmJSBS_Currency_BO.Marker17;
        
Marker18 = parmJSBS_Currency_BO.Marker18;
        
Marker19 = parmJSBS_Currency_BO.Marker19;
        
Marker20 = parmJSBS_Currency_BO.Marker20;
        
LeadCurrencyIndicator = parmJSBS_Currency_BO.LeadCurrencyIndicator;
        
CurrencyName = parmJSBS_Currency_BO.CurrencyName;
        
MiddleRateToLeadCurrency = parmJSBS_Currency_BO.MiddleRateToLeadCurrency;
        
BuyingRateToLeadCurrency = parmJSBS_Currency_BO.BuyingRateToLeadCurrency;
        
SellingRateToLeadCurrency = parmJSBS_Currency_BO.SellingRateToLeadCurrency;
    }

/*
 * --------------------
 * de:
 * METHODE zum Vergleichen von zwei Business Objects und zum Prüfen
 * ob mindestens einer der geschäftsbezogenen Werte unterschiedlich ist.
 * en:

 * METHOD to compare two Business Objects and check if
 * at least one of the Business Values is different. */
    
public boolean isDifferent(JSBS_Currency_BO parmJSBS_Currency_BO) {
/*
 * de:
 * Wenn der Wert des Parameters 'null' ist dann 'true' (verschieden) zurück liefern.
 * en:

 * If the value of the parameter is 'null' then return 'true' (different). */
        
if (parmJSBS_Currency_BO == null) return true;
/*
 * de: Vergleich zweier Werte die durch eine Klasse repräsentiert sind.
 * en: Comparison of two values represented by a class. */

        
if ((this.LeadCurrencyIndicator == null) || (parmJSBS_Currency_BO.LeadCurrencyIndicator == null)) {
/* de: Prüfen ob beide Werte 'null' sind.
 * en: Verify if both values are 'null'. */

          
if ((this.LeadCurrencyIndicator == null) && (parmJSBS_Currency_BO.LeadCurrencyIndicator == null)) {
/* de: Beide Werte sind 'null'; damit sind beide gleich.
 * en: Both values are 'null'; so both are equal. */

          }
          
else {
/* de: Nur einer der beiden Werte kann 'null' sein; damit sind beide verschieden.
 * en: Only one of both values can be 'null'; so there is a difference. */

            
return true;
          }
        }
        
else {
/* de: Keiner der beiden Werte ist 'null'; damit können beide Werte verglichen werden.
 * en: None of both values is 'null'; so both values can be compared. */

          
if (this.LeadCurrencyIndicator.compareTo(parmJSBS_Currency_BO.LeadCurrencyIndicator) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.ISOCurrencyCode == null) || (parmJSBS_Currency_BO.ISOCurrencyCode == null)) {
          
if ((this.ISOCurrencyCode == null) && (parmJSBS_Currency_BO.ISOCurrencyCode == null)) {}
          
else return true;
        }
        
else {
          
if (this.ISOCurrencyCode.compareTo(parmJSBS_Currency_BO.ISOCurrencyCode) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.LanguageCodeForLabelling == null) || (parmJSBS_Currency_BO.LanguageCodeForLabelling == null)) {
          
if ((this.LanguageCodeForLabelling == null) && (parmJSBS_Currency_BO.LanguageCodeForLabelling == null)) {}
          
else return true;
        }
        
else {
          
if (this.LanguageCodeForLabelling.compareTo(parmJSBS_Currency_BO.LanguageCodeForLabelling) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker01 == null) || (parmJSBS_Currency_BO.Marker01 == null)) {
          
if ((this.Marker01 == null) && (parmJSBS_Currency_BO.Marker01 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker01.compareTo(parmJSBS_Currency_BO.Marker01) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker02 == null) || (parmJSBS_Currency_BO.Marker02 == null)) {
          
if ((this.Marker02 == null) && (parmJSBS_Currency_BO.Marker02 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker02.compareTo(parmJSBS_Currency_BO.Marker02) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker03 == null) || (parmJSBS_Currency_BO.Marker03 == null)) {
          
if ((this.Marker03 == null) && (parmJSBS_Currency_BO.Marker03 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker03.compareTo(parmJSBS_Currency_BO.Marker03) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker04 == null) || (parmJSBS_Currency_BO.Marker04 == null)) {
          
if ((this.Marker04 == null) && (parmJSBS_Currency_BO.Marker04 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker04.compareTo(parmJSBS_Currency_BO.Marker04) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker05 == null) || (parmJSBS_Currency_BO.Marker05 == null)) {
          
if ((this.Marker05 == null) && (parmJSBS_Currency_BO.Marker05 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker05.compareTo(parmJSBS_Currency_BO.Marker05) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker06 == null) || (parmJSBS_Currency_BO.Marker06 == null)) {
          
if ((this.Marker06 == null) && (parmJSBS_Currency_BO.Marker06 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker06.compareTo(parmJSBS_Currency_BO.Marker06) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker07 == null) || (parmJSBS_Currency_BO.Marker07 == null)) {
          
if ((this.Marker07 == null) && (parmJSBS_Currency_BO.Marker07 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker07.compareTo(parmJSBS_Currency_BO.Marker07) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker08 == null) || (parmJSBS_Currency_BO.Marker08 == null)) {
          
if ((this.Marker08 == null) && (parmJSBS_Currency_BO.Marker08 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker08.compareTo(parmJSBS_Currency_BO.Marker08) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker09 == null) || (parmJSBS_Currency_BO.Marker09 == null)) {
          
if ((this.Marker09 == null) && (parmJSBS_Currency_BO.Marker09 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker09.compareTo(parmJSBS_Currency_BO.Marker09) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker10 == null) || (parmJSBS_Currency_BO.Marker10 == null)) {
          
if ((this.Marker10 == null) && (parmJSBS_Currency_BO.Marker10 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker10.compareTo(parmJSBS_Currency_BO.Marker10) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker11 == null) || (parmJSBS_Currency_BO.Marker11 == null)) {
          
if ((this.Marker11 == null) && (parmJSBS_Currency_BO.Marker11 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker11.compareTo(parmJSBS_Currency_BO.Marker11) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker12 == null) || (parmJSBS_Currency_BO.Marker12 == null)) {
          
if ((this.Marker12 == null) && (parmJSBS_Currency_BO.Marker12 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker12.compareTo(parmJSBS_Currency_BO.Marker12) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker13 == null) || (parmJSBS_Currency_BO.Marker13 == null)) {
          
if ((this.Marker13 == null) && (parmJSBS_Currency_BO.Marker13 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker13.compareTo(parmJSBS_Currency_BO.Marker13) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker14 == null) || (parmJSBS_Currency_BO.Marker14 == null)) {
          
if ((this.Marker14 == null) && (parmJSBS_Currency_BO.Marker14 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker14.compareTo(parmJSBS_Currency_BO.Marker14) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker15 == null) || (parmJSBS_Currency_BO.Marker15 == null)) {
          
if ((this.Marker15 == null) && (parmJSBS_Currency_BO.Marker15 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker15.compareTo(parmJSBS_Currency_BO.Marker15) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker16 == null) || (parmJSBS_Currency_BO.Marker16 == null)) {
          
if ((this.Marker16 == null) && (parmJSBS_Currency_BO.Marker16 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker16.compareTo(parmJSBS_Currency_BO.Marker16) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker17 == null) || (parmJSBS_Currency_BO.Marker17 == null)) {
          
if ((this.Marker17 == null) && (parmJSBS_Currency_BO.Marker17 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker17.compareTo(parmJSBS_Currency_BO.Marker17) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker18 == null) || (parmJSBS_Currency_BO.Marker18 == null)) {
          
if ((this.Marker18 == null) && (parmJSBS_Currency_BO.Marker18 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker18.compareTo(parmJSBS_Currency_BO.Marker18) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker19 == null) || (parmJSBS_Currency_BO.Marker19 == null)) {
          
if ((this.Marker19 == null) && (parmJSBS_Currency_BO.Marker19 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker19.compareTo(parmJSBS_Currency_BO.Marker19) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.Marker20 == null) || (parmJSBS_Currency_BO.Marker20 == null)) {
          
if ((this.Marker20 == null) && (parmJSBS_Currency_BO.Marker20 == null)) {}
          
else return true;
        }
        
else {
          
if (this.Marker20.compareTo(parmJSBS_Currency_BO.Marker20) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.CurrencyName == null) || (parmJSBS_Currency_BO.CurrencyName == null)) {
          
if ((this.CurrencyName == null) && (parmJSBS_Currency_BO.CurrencyName == null)) {}
          
else return true;
        }
        
else {
          
if (this.CurrencyName.compareTo(parmJSBS_Currency_BO.CurrencyName ) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.MiddleRateToLeadCurrency == null) || (parmJSBS_Currency_BO.MiddleRateToLeadCurrency == null)) {
          
if ((this.MiddleRateToLeadCurrency == null) && (parmJSBS_Currency_BO.MiddleRateToLeadCurrency == null)) {}
          
else return true;
        }
        
else {
          
if (this.MiddleRateToLeadCurrency.compareTo(parmJSBS_Currency_BO.MiddleRateToLeadCurrency ) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.BuyingRateToLeadCurrency == null) || (parmJSBS_Currency_BO.BuyingRateToLeadCurrency == null)) {
          
if ((this.BuyingRateToLeadCurrency == null) && (parmJSBS_Currency_BO.BuyingRateToLeadCurrency == null)) {}
          
else return true;
        }
        
else {
          
if (this.BuyingRateToLeadCurrency.compareTo(parmJSBS_Currency_BO.BuyingRateToLeadCurrency ) != 0)
            
return true;
        }

/*
 * ***** */

        
if ((this.SellingRateToLeadCurrency == null) || (parmJSBS_Currency_BO.SellingRateToLeadCurrency == null)) {
          
if ((this.SellingRateToLeadCurrency == null) && (parmJSBS_Currency_BO.SellingRateToLeadCurrency == null)) {}
          
else return true;
        }
        
else {
          
if (this.SellingRateToLeadCurrency.compareTo(parmJSBS_Currency_BO.SellingRateToLeadCurrency ) != 0)
            
return true;
        }
/* de: Keine Unterschiede gefunden.
 * en: No difference found. */
        return false;
    }
/*
 * --------------------
 * de:
 * METHODE zum Übertragen der Attributs-Werte des Data-Base-Access (DBA) Objekts
 * das diesem Business-Object thematisch zugeordnet ist auf die Variablen dieses BO.
 * en:

 * METHOD to transfer the attribute-values from the Data-Base-Access (DBA) Object
 * that is attached to this Business Object to the variables of this BO.  */
    
public void getDBAAttributes(JSBS_Parameter_DBA parmJSBS_Parameter_DBA) {
/* 
 * de:
 * Methode der geerbten Superklasse (JSBS_BO) aufrufen um die Werte der
 * Allgemeinen Attribute (Common Attributes) zu übertragen.
 * en:
 * Call the method of the inherited superclass (JSBS_BO) to transfer the values of the
 * Common Attributes. */
      
getCommonDBAAttributes(parmJSBS_Parameter_DBA);
/* 
 * de: Geschäftsbezogene Werte dieses Business Object übertragen.
 * en: Transfer the business specific values of this Business Object. */

      
this.ISOCurrencyCode = parmJSBS_Parameter_DBA.Value01;
      
this.LanguageCodeForLabelling = parmJSBS_Parameter_DBA.Value02;
/* 
 * de: Spezieller Algorithmus zum Übernehmen der Marker-Werte aus der Zeichenkette.
 * en: Special algorithm to transfer the values for the markers out of the string. */

      expandMarkerSet(parmJSBS_Parameter_DBA.
Value03);
/* *** */ 
      this.LeadCurrencyIndicator = parmJSBS_Parameter_DBA.Value04;
      
this.CurrencyName = parmJSBS_Parameter_DBA.Value06;
/* 
 * de: Spezieller Algorithmus zum Umwandeln von String auf BigDecimal.
 * en: Special algorithm to convert String to BigDecimal. */

      
try {this.MiddleRateToLeadCurrency = new BigDecimal(parmJSBS_Parameter_DBA.Value07.trim());}
      
catch (Exception Exc) {this.MiddleRateToLeadCurrency = new BigDecimal(0);}
      
try {this.BuyingRateToLeadCurrency = new BigDecimal(parmJSBS_Parameter_DBA.Value08.trim());}
      
catch (Exception Exc) {this.BuyingRateToLeadCurrency = new BigDecimal(0);}
      
try {this.SellingRateToLeadCurrency = new BigDecimal(parmJSBS_Parameter_DBA.Value09.trim());}
      
catch (Exception Exc) {this.SellingRateToLeadCurrency = new BigDecimal(0);}
    }

/* ---------------------
 * de:
 * METHODE zum Prüfen auf Konsistenz der Daten dieses BO.
 
 *
 
 * Diese Methode ist dazu gedacht, eine Prüfung auf Korrektheit der Werte dieses BO durchzuführen
 
 * bevor die Daten gespeichert werden.
 
 * Eine zusätzliche Prüfung der Konsistenz der Daten ist dann erforderlich
 * * wenn nicht sicher gestellt werden kann, dass bei der Eingabe der Daten die Prüfungen durchgeführt werden
 * oder
 * * wenn die Prüfungen so komplex sind, dass sie bei der Eingabe nicht vollständig durchgeführt werden können.
  
 *

 * Wenn die Prüfregeln nicht erfüllt werden, kann als genereller Status-Code die Konstante 
 * CONST_INCONSISTENT_DATA (aus der Basisklasse JSBS_BO)
verwendet werden oder es können in dieser Klasse 
 * detailliertere Konstante für den Status-Code definiert werden.
 
 *
 
 * Für Prüf-Algorithmen, die Werte anderer Business-Objects erfordern (und damit auf die Datenbank)
 
 * zugreifen müssen) kann diese Methode in der Klasse für das Server-Seitige BO (BOS)
 
 * überschrieben werden.
 * 
 * en:
 * METHOD to verify the consistency of the data of this BO.
 * 
 * This method is intended to check the consistency of the values of this BO before the data is stored.
 * An additional verification is needed
 * * if it can not be assured that the checks were made at the time when the data was entered (at the GUI)
 * or
 * * the verification is so complex that it could not be done completely when the data was entered.
 * 
 * If the consitency-rules are not fulfilled, the general status-code CONST_INCONSISTENT_DATA (defined as
 * constant within the base-class JSBS_BO) can be used or more detailed status-codes can be defined
 * within this class.
 * 
 * For verification-algorithms that requiere the values of othe business-objects (which means they need
 * acces to the database), this method can be overwritten within the class for the server-side-BO (BOS). */

    
public boolean isConsistentData() {
/*
 * de: Anschließend ist der Algorithmus – wenn notwendig.
 * en: Following is the algorithm – if needed
 * */

      
/* 
 * de:
 * Wenn in dieser Methode keine Prüfungen durchgeführt werden, werden die Daten
 
 * als 'konsistent' betrachtet.
 * en:
 * If no checks were made within this methode, then the data is considered to be
 * 'consistent'.*/
      return true;
    }
/* ---------------------
 * de:
 * METHODE zum 'komprimieren' der Werte in den einzelnen Markern dieses BO
 * in eine Zeichenkette für die Speicherung im DB-Attribut ParameterValue04.
 
 * 
 * en:
 * METHOD to 'compress' the values of the single Markers of this BO into a string
 * that is stored within the DB-Attribute ParameterValue04. */

    
public String compressMarkerSet() {
/*
 * de:
 * Zur leichteren Bearbeitung eine Variable der Klasse 'StringBuffer' definieren.
 * Diese Variable wird gleich mit den codierten Werten für 'false' initialisiert.

 * en:
 * Define a variable of class 'StringBuffer' for easier processing in the following code.
 * This variable is initialized with the coded values for 'false'. */

        StringBuffer strParameterValue03=
new StringBuffer("00000000000000000000");
/*
 * de:
 * Abfragen jedes einzelnen Markers und bei Bedarf die zugehörige Position im StringBuffer ändern.
 * en:
 * Verify each single Marker and change the associated position in the StringBuffer if needed. */

        
if (Marker01) strParameterValue03.setCharAt(0, '1');
        
if (Marker02) strParameterValue03.setCharAt(1, '1');
        
if (Marker03) strParameterValue03.setCharAt(2, '1');
        
if (Marker04) strParameterValue03.setCharAt(3, '1');
        
if (Marker05) strParameterValue03.setCharAt(4, '1');
        
if (Marker06) strParameterValue03.setCharAt(5, '1');
        
if (Marker07) strParameterValue03.setCharAt(6, '1');
        
if (Marker08) strParameterValue03.setCharAt(7, '1');
        
if (Marker09) strParameterValue03.setCharAt(8, '1');
        
if (Marker10) strParameterValue03.setCharAt(9, '1');
        
if (Marker11) strParameterValue03.setCharAt(10, '1');
        
if (Marker12) strParameterValue03.setCharAt(11, '1');
        
if (Marker13) strParameterValue03.setCharAt(12, '1');
        
if (Marker14) strParameterValue03.setCharAt(13, '1');
        
if (Marker15) strParameterValue03.setCharAt(14, '1');
        
if (Marker16) strParameterValue03.setCharAt(15, '1');
        
if (Marker17) strParameterValue03.setCharAt(16, '1');
        
if (Marker18) strParameterValue03.setCharAt(17, '1');
        
if (Marker19) strParameterValue03.setCharAt(18, '1');
        
if (Marker20) strParameterValue03.setCharAt(19, '1');
/*
 * de: Umwandeln des StringBuffer in einen String und an die aufrufende Methode zurück liefern.
 * en: Convert the StringBuffer into a String and return to the calling method. */

        
return strParameterValue03.toString();
    }
/* ---------------------
 * de:
 * METHODE zum 'expandieren' des komprimierten Wert im DB-Attribut ParameterValue04
 * in die einzelnen Werte der Variablen Marker01 bis Marker20 in diesem BO.
 * 
 * en:
 * METHOD to 'expand' the compressed value of the DB-Attribute ParameterValue03
 * into the singular values of the variables Marker01 to Marker20 of this BO. */

    
public void expandMarkerSet(String parmParameterValue03) {
/*
 * de:
 * Setzen der Marker auf den Standard-Wert 'false'.
 * Damit haben die Marker einen definierten Wert auch wenn die Zeichenkette mit dem
 * komprimierten Wert (parmParameterValue04) kein gültiges Format hat.

 * en:
 * Set the Markers to the default-value 'false'.
 * So the Markers have a defined value even if the string with the compressed value
 * (parmParameterValue04) contains an invalid value.
*/
        
Marker01 false;
        
Marker02 false;
        
Marker03 false;
        
Marker04 false;
        
Marker05 false;
        
Marker06 false;
        
Marker07 false;
        
Marker08 false;
        
Marker09 false;
        
Marker10 false;
        
Marker11 false;
        
Marker12 false;
        
Marker13 false;
        
Marker14 false;
        
Marker15 false;
        
Marker16 false;
        
Marker17 false;
        
Marker18 false;
        
Marker19 false;
        
Marker20 false;
/*
 * de: Prüfen ob der übergebene Parameter nicht 'null' ist.
 * en: Verify if the passed parameter is not 'null'. */

        
if (parmParameterValue03 == null) return;
/*
 * de: Zur leichteren Bearbeitung den übergebenen Parameter in einen 'StringBuffer' umwandeln.
 * en: Convert the passed parameter into a 'StringBuffer' as this class is easier to process. */

        StringBuffer strParameterValue03
 = new StringBuffer(parmParameterValue03);
/*
 * de: Feststellen der Anzahl der Zeichen für die Steuerung der folgenden for-Schleife.
 * en: Get the number of character to control the following for-loop. */

        
int intParameterLength = strParameterValue03.length();
/*
 * de: Index und einzelner Charakter für die Verarbeitung in der folgenden for-Schleife.
 * en: Index and single character for the processing in the following for-loop. */

        
int intIndex;
        
char chrMarkerValue;
/*
 * de:
 * for-Schleife zum Untersuchen jedes einzelnen Zeichens in der als Parameter übergebenen
 * Zeichenkette. Abhängig vom Wert des einzelnen Zeichens wird der Wert des zugeordneten
 * Markers verändert.
 * en:
 * for-loop to inspect each single character of the string passed as parameter.
 * Depending on the value of each character the value of the associated Marker is changed. */

        
for (intIndex = 0; (intIndex < intParameterLength) && (intIndex < 20); intIndex++) {
/*
 * de: 'Herausholen' des zu prüfenden Zeichens aus der Zeichenkette.
 * en: Get the character to be verified out of the string. */

      
      chrMarkerValue = strParameterValue03.charAt(intIndex);
/*
 * de:
 * Prüfen ob das untersuchte Zeichen den Wert '1' hat. Das bedeutet, dass der zugehörige Marker
 * auf den Wert 'true' gesetzt wird.
 * Um Codezeilen zu sparen, wird die verkehrte Logik codiert.
 * en:
 * Verify if the inspected character has the value '1'. That means, that the associated Marker
 * ist set to the value 'true'.
 * To avoid lines of code a reverse logic is used. */

      
      if (chrMarkerValue != '1'continue;
      
      if (intIndex == 0) Marker01 true;
      
      if (intIndex == 1) Marker02 true;
      
      if (intIndex == 2) Marker03 true;
      
      if (intIndex == 3) Marker04 true;
      
      if (intIndex == 4) Marker05 true;
      
      if (intIndex == 5) Marker06 true;
      
      if (intIndex == 6) Marker07 true;
      
      if (intIndex == 7) Marker08 true;
      
      if (intIndex == 8) Marker09 true;
      
      if (intIndex == 9) Marker10 true;
      
      if (intIndex == 10) Marker11 true;
      
      if (intIndex == 11) Marker12 true;
      
      if (intIndex == 12) Marker13 true;
      
      if (intIndex == 13) Marker14 true;
      
      if (intIndex == 14) Marker15 true;
      
      if (intIndex == 15) Marker16 true;
      
      if (intIndex == 16) Marker17 true;
      
      if (intIndex == 17) Marker18 true;
      
      if (intIndex == 18) Marker19 true;
      
      if (intIndex == 19) Marker20 true;
        
}
    }
}

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