CountryVO.java
001 /*
002  * Created on 26.03.2004
003  */
004 package de.fub.tip.datenanzeige.ormapper;
005 
006 import java.io.Serializable;
007 
008 import org.apache.log4j.Logger;
009 
010 /**
011  * Sinn: kapselt eine Landesangabe aus der Datenbank
012  
013  @author hirsch, 26.03.2004
014  @version 2004-03-28
015  * $Id: CountryVO.java,v 1.4 2004/06/11 21:52:48 hirsch Exp $
016  */
017 public class CountryVO implements ViewObject, Serializable {
018   /** datenbankinterne Objekt-ID */
019   private Integer id = null;
020   /** Name des Landes */
021   private String country = null;
022   /** Name der Landeswährung */
023   private String currency = null;
024   
025   /**
026   * Standardkonstruktor, der nichts macht.<br> 
027   * Die Werteinstellung geschieht nur über die SETTER-Methoden.
028   <br>
029   */
030   public CountryVO() {
031   // end of Konstruktor
032 
033   /**
034    @see de.fub.tip.datenanzeige.ormapper.ViewObject#logObject(org.apache.log4j.Logger)
035    */
036   public void logObject(Logger logger) {
037     logger.debug("Country.VO.logObjekt( "this.toString() ")");
038   // end of
039   
040   /**
041    * nullpointersichere Stringrepräsentation 
042    * eines Landesobjektes
043    @return Land als String
044    */
045   public String toString() {
046     String ergebnis = "Land= ";
047     if this.getCountry() != null ergebnis+= this.getCountry();
048     ergebnis += " (";
049     ifthis.getId() != null ergebnis+= this.getId();
050     ergebnis += "), Währung ist ";
051     if this.getCurrency() != nullergebnis += this.getCurrency();
052     
053     return ergebnis;
054   // end of toString 
055  
056   /**
057    * gibt Name des Landes zurück
058    @return Landesname
059    */
060   public String getCountry() {
061     return country;
062   }
063 
064   /**
065    * setzt den Namen des Landes
066    @param country landesname
067    */
068   public void setCountry(String country) {
069     this.country = country;
070   }
071 
072   /**
073    * gibt Währung zurück
074    @return währung
075    */
076   public String getCurrency() {
077     return currency;
078   }
079 
080   /**
081    * setzt Landeswährung
082    @param currency währung
083    */
084   public void setCurrency(String currency) {
085     this.currency = currency;
086   }
087 
088   /**
089    * gibt ID aus
090    @return id aus Datenbank
091    */
092   public Integer getId() {
093     return id;
094   }
095 
096   /**
097    * setze die ID
098    @param id ObjektID
099    */
100   public void setId(Integer id) {
101     this.id = id;
102   }
103 // end of class