> List of tutorials for developing a Fat-Client

Code for Business Object for a 'Project' - Fat-Client-Development

* For this document and all references (links) please obey the hints and regulations concerning copyright, disclaimer and trademarks.

  • The owner of this web-site (www.javascout.biz) is not responsible for the content of web-sites linked within this document or other documents of www.javascout.biz.

  • If this document or other documents of this web-site (www.javascout.biz) infringes your rights or you think that rights of others (third parties) are infringed, please inform the author.
    An e-mail can be sent by clicking onto the 'hungry mailbox' in the upper right corner.

Last revision of this document:
2006-06-22

This is document contains the code for Class JS_ErrDB_Project_BO.
For easy 'cut and paste' ;-)

package js_errdb.bo;

import js_base.bo.*;
import js_errdb.dba.*;

/**
 
*
 * @author
kurt@javascout.biz
 * @date 2006-06-22
 *
 * @description
 *  Business Object for the 'Project'.
 *
 *  Please see the description at the variables-declaration
.
 *
 *  User-Key: ProjectCode & LanguageCode
.

 
*
 * @change-log
 * when         who               why
 * --------------------------------------------------------
 *
 */

public class JS_ErrDB_Project_BO extends JSBS_BO {
/*
 * Project-Code; that is a shortcut for the Project. */
    
public String ProjectCode = "";
/*
 * Language-Code; that is the ISO-CODE for the language the Error-Messages are in. */
    public String LanguageCode = "";
/*
 * Directory where the file with the language-specific error-messages is
 * written out when the file with the XML-structure is generated. */
    public String TargetDirectory = "";
/*
 * --------------------
 * Method to copy the values from another object into this object. */
    public void getJS_ErrDB_Project_BO(JS_ErrDB_Project_BO parmJS_ErrDB_Project_BO) {
/*
 * Use the method of the super-class to copy the Common Attributes,
 * StatusCode and StatusMsg. */
        super.getJSBS_BO(parmJS_ErrDB_Project_BO);
        ProjectCode = parmJS_ErrDB_Project_BO.ProjectCode;
        LanguageCode = parmJS_ErrDB_Project_BO.LanguageCode;
        TargetDirectory = parmJS_ErrDB_Project_BO.TargetDirectory;
    }

/*
 * --------------------
 * Method to compare two Business Objects and check if
 * at least one of the Business Attributes is different. */
    public boolean isDifferent(JS_ErrDB_Project_BO parmJS_ErrDB_Project_BO) {
        if (this.ProjectCode.compareTo(parmJS_ErrDB_Project_BO.ProjectCode) != 0) return true;
        if (this.LanguageCode.compareTo(parmJS_ErrDB_Project_BO.LanguageCode) != 0) return true;
        if (this.TargetDirectory.compareTo(parmJS_ErrDB_Project_BO.TargetDirectory) != 0) return true;
        return false;
    
}
/*
 * --------------------
 * Method to transfer the attributes from the Data-Base-Access (DBA) Object
 * that is closest to this Business Object to the variables of this BO.
 * 
 * This method is in the _BO_ class to be called when a record within a set has
 * to be transferred*/
    
public void
getDBAAttributes(JS_ErrDB_Project_DBA parmJS_ErrDB_Project_DBA) {
/* Call the method of the superclass (JSBS_BO) to transfer the values of the
 * Common Attributes. */
      getCommonDBAAttributes(parmJS_ErrDB_Project_DBA);
/* Transfer the business specific attributes of this Business Object. */
      
this.ProjectCode = parmJS_ErrDB_Project_DBA.ProjectCode;
      this.LanguageCode = parmJS_ErrDB_Project_DBA.LanguageCode;
      this.TargetDirectory = parmJS_ErrDB_Project_DBA.TargetDirectory;
    }
}