home *** CD-ROM | disk | FTP | other *** search
/ ftp.disi.unige.it / 2015-02-11.ftp.disi.unige.it.tar / ftp.disi.unige.it / pub / .person / GuerriniG / dispense / corso-oodb / progetti-99 / progetto1 / Goal.java < prev    next >
Text File  |  1999-10-19  |  1KB  |  76 lines

  1. package progetto1;
  2.  
  3. import com.odi.*;
  4. import com.odi.util.*;
  5. import java.util.*;
  6.  
  7.  
  8. public class Goal{
  9.  
  10.  
  11.     public boolean showSlotName=false; // look at toString method ...
  12.  
  13.     // Attributes
  14.     public int minuto;
  15.     public boolean autogoal;
  16.     public Giocatore marcatore;
  17.  
  18.  
  19.  
  20.  
  21.     ////////////////////////////////////////////////////////
  22.     // Constructor
  23.     public Goal()
  24.     {
  25.  
  26.     }
  27.  
  28.     public Goal(int _minuto, boolean _autogoal, Giocatore _marcatore)
  29.     {
  30.  
  31.         minuto=_minuto;
  32.         autogoal=_autogoal;
  33.         marcatore=_marcatore;
  34.  
  35.     }
  36.  
  37.  
  38.  
  39.     ////////////////////////////////////////////////////////
  40.     // The Extents
  41.     void updateExtents(Database db, boolean add)
  42.     {
  43.  
  44.  
  45.  
  46.     }
  47.  
  48.     ////////////////////////////////////////////////////////
  49.     // Hook the IPersistent method
  50.  
  51.     ////////////////////////////////////////////////////////
  52.     // Override toString method
  53.  
  54.     public String toString()
  55.     {
  56.         String ret;
  57.         ret = super.toString();
  58.  
  59.         if (showSlotName)
  60.             ret = ret + " minuto";
  61.         ret = ret + " " + minuto;
  62.         if (showSlotName)
  63.             ret = ret + " autogoal";
  64.         ret = ret + " " + autogoal;
  65.         if (showSlotName)
  66.             ret = ret + " marcatore";
  67.         ret = ret + " " + marcatore;
  68.         return ret;
  69.     }
  70.  
  71. // Operations
  72.  
  73.  
  74.  
  75. }
  76.