home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / Notes.jar / lotus / notes / DateRange.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-15  |  2.4 KB  |  97 lines

  1. package lotus.notes;
  2.  
  3. public class DateRange extends NotesBase {
  4.    private transient Session session;
  5.  
  6.    protected DateRange() throws NotesException {
  7.    }
  8.  
  9.    protected DateRange(Session var1, int var2) throws NotesException {
  10.       super(var2, 22);
  11.       if (var1 == null) {
  12.          throw new NotesException(JavaString.resource.getString("missing_session_object"));
  13.       } else {
  14.          this.session = var1;
  15.          var1.AddObject(this);
  16.       }
  17.    }
  18.  
  19.    protected DateRange(Session var1, int var2, DateTime var3, DateTime var4) throws NotesException {
  20.       super(var2, 22);
  21.       if (var1 == null) {
  22.          throw new NotesException(JavaString.resource.getString("missing_session_object"));
  23.       } else {
  24.          this.session = var1;
  25.          var1.AddObject(this);
  26.          this.setStartDateTime(var3);
  27.          this.setEndDateTime(var4);
  28.       }
  29.    }
  30.  
  31.    protected void InternalFinalize() throws NotesException {
  32.       super.finalize();
  33.    }
  34.  
  35.    public void finalize() throws NotesException {
  36.       this.session.RemoveObject(this);
  37.       this.InternalFinalize();
  38.    }
  39.  
  40.    public void recycle() throws NotesException {
  41.       try {
  42.          this.session.RemoveObject(this);
  43.       } catch (NotesException var5) {
  44.       } finally {
  45.          super.Recycle();
  46.       }
  47.  
  48.    }
  49.  
  50.    public int GetCppObj() {
  51.       return super.GetCppObj();
  52.    }
  53.  
  54.    public DateTime getStartDateTime() throws NotesException {
  55.       ((NotesBase)this).CheckObject();
  56.       return this.session.FindOrCreateDateTime(((NotesBase)this).PropGetAdt(1690));
  57.    }
  58.  
  59.    public void setStartDateTime(DateTime var1) throws NotesException {
  60.       ((NotesBase)this).CheckObject();
  61.       DateTime var2 = this.session.FindOrCreateDateTime(var1.GetCppObj());
  62.       ((NotesBase)this).PropSetDate(1690, var2);
  63.    }
  64.  
  65.    public DateTime getEndDateTime() throws NotesException {
  66.       ((NotesBase)this).CheckObject();
  67.       return this.session.FindOrCreateDateTime(((NotesBase)this).PropGetAdt(1691));
  68.    }
  69.  
  70.    public void setEndDateTime(DateTime var1) throws NotesException {
  71.       ((NotesBase)this).CheckObject();
  72.       DateTime var2 = this.session.FindOrCreateDateTime(var1.GetCppObj());
  73.       ((NotesBase)this).PropSetDate(1691, var2);
  74.    }
  75.  
  76.    public String getText() throws NotesException {
  77.       ((NotesBase)this).CheckObject();
  78.       return ((NotesBase)this).PropGetString(1692);
  79.    }
  80.  
  81.    public String toString() {
  82.       String var1;
  83.       try {
  84.          var1 = this.getText();
  85.       } catch (Exception var2) {
  86.          var1 = null;
  87.       }
  88.  
  89.       return var1;
  90.    }
  91.  
  92.    public void setText(String var1) throws NotesException {
  93.       ((NotesBase)this).CheckObject();
  94.       ((NotesBase)this).PropSetString(1692, var1);
  95.    }
  96. }
  97.