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

  1. package lotus.domino.local;
  2.  
  3. import lotus.domino.NotesException;
  4. import lotus.notes.JavaString;
  5.  
  6. public class ViewEntryCollection extends NotesBase implements lotus.domino.ViewEntryCollection {
  7.    protected transient View parentView;
  8.    private transient ViewEntry currEntry;
  9.  
  10.    private native int NgetFirstEntry();
  11.  
  12.    private native int NgetLastEntry();
  13.  
  14.    private native int NgetNextEntry(ViewEntry var1);
  15.  
  16.    private native int NgetPrevEntry(ViewEntry var1);
  17.  
  18.    private native int NgetNthEntry(int var1);
  19.  
  20.    private native void NFTSearch(String var1, int var2);
  21.  
  22.    private native void NremoveAll(boolean var1);
  23.  
  24.    private native void NupdateAll();
  25.  
  26.    private native void NstampAll(String var1, Object var2);
  27.  
  28.    private native void NputAllInFolder(String var1);
  29.  
  30.    private native void NremoveAllFromFolder(String var1);
  31.  
  32.    private native void NaddEntry(Object var1);
  33.  
  34.    private native void NdeleteEntry(ViewEntry var1);
  35.  
  36.    private native int NgetEntry(Object var1);
  37.  
  38.    protected ViewEntryCollection() throws NotesException {
  39.    }
  40.  
  41.    protected ViewEntryCollection(View var1, int var2) throws NotesException {
  42.       super(var2, 29);
  43.       if (var1 == null) {
  44.          throw new NotesException(4407, JavaString.resource.getString("missing_view_object"));
  45.       } else {
  46.          this.parentView = var1;
  47.          var1.database.AddObject(this);
  48.       }
  49.    }
  50.  
  51.    protected void InternalFinalize() throws NotesException {
  52.       super.finalize();
  53.    }
  54.  
  55.    public void finalize() throws NotesException {
  56.       this.parentView.database.RemoveObject(this);
  57.       this.InternalFinalize();
  58.    }
  59.  
  60.    public void recycle() throws NotesException {
  61.       try {
  62.          this.parentView.database.RemoveObject(this);
  63.       } catch (NotesException var5) {
  64.       } finally {
  65.          super.Recycle();
  66.       }
  67.  
  68.    }
  69.  
  70.    public lotus.domino.ViewEntry getFirstEntry() throws NotesException {
  71.       ((NotesBase)this).CheckObject();
  72.       synchronized(this){}
  73.  
  74.       lotus.domino.ViewEntry var1;
  75.       try {
  76.          int var4 = this.NgetFirstEntry();
  77.          if (var4 != 0) {
  78.             this.currEntry = new ViewEntry(this, var4, (CollectionPos)null);
  79.             var1 = this.currEntry;
  80.             return var1;
  81.          }
  82.  
  83.          var1 = null;
  84.       } catch (Throwable var6) {
  85.          throw var6;
  86.       }
  87.  
  88.       return var1;
  89.    }
  90.  
  91.    public lotus.domino.ViewEntry getLastEntry() throws NotesException {
  92.       ((NotesBase)this).CheckObject();
  93.       synchronized(this){}
  94.  
  95.       lotus.domino.ViewEntry var1;
  96.       try {
  97.          int var4 = this.NgetLastEntry();
  98.          if (var4 != 0) {
  99.             this.currEntry = new ViewEntry(this, var4, (CollectionPos)null);
  100.             var1 = this.currEntry;
  101.             return var1;
  102.          }
  103.  
  104.          var1 = null;
  105.       } catch (Throwable var6) {
  106.          throw var6;
  107.       }
  108.  
  109.       return var1;
  110.    }
  111.  
  112.    public lotus.domino.ViewEntry getNextEntry(lotus.domino.ViewEntry var1) throws NotesException {
  113.       ((NotesBase)this).CheckObject();
  114.       synchronized(this){}
  115.  
  116.       lotus.domino.ViewEntry var2;
  117.       try {
  118.          if (var1 == null) {
  119.             throw new NotesException(4446, JavaString.resource.getString("missing_viewentry_object"));
  120.          }
  121.  
  122.          int var5 = this.NgetNextEntry((ViewEntry)var1);
  123.          if (var5 != 0) {
  124.             this.currEntry = new ViewEntry(this, var5, (CollectionPos)null);
  125.             var2 = this.currEntry;
  126.             return var2;
  127.          }
  128.  
  129.          var2 = null;
  130.       } catch (Throwable var7) {
  131.          throw var7;
  132.       }
  133.  
  134.       return var2;
  135.    }
  136.  
  137.    public lotus.domino.ViewEntry getPrevEntry(lotus.domino.ViewEntry var1) throws NotesException {
  138.       ((NotesBase)this).CheckObject();
  139.       synchronized(this){}
  140.  
  141.       lotus.domino.ViewEntry var2;
  142.       try {
  143.          if (var1 == null) {
  144.             throw new NotesException(4446, JavaString.resource.getString("missing_viewentry_object"));
  145.          }
  146.  
  147.          int var5 = this.NgetPrevEntry((ViewEntry)var1);
  148.          if (var5 != 0) {
  149.             this.currEntry = new ViewEntry(this, var5, (CollectionPos)null);
  150.             var2 = this.currEntry;
  151.             return var2;
  152.          }
  153.  
  154.          var2 = null;
  155.       } catch (Throwable var7) {
  156.          throw var7;
  157.       }
  158.  
  159.       return var2;
  160.    }
  161.  
  162.    public lotus.domino.ViewEntry getNthEntry(int var1) throws NotesException {
  163.       ((NotesBase)this).CheckObject();
  164.       synchronized(this){}
  165.  
  166.       lotus.domino.ViewEntry var2;
  167.       try {
  168.          int var5 = this.NgetNthEntry(var1);
  169.          if (var5 != 0) {
  170.             this.currEntry = new ViewEntry(this, var5, (CollectionPos)null);
  171.             var2 = this.currEntry;
  172.             return var2;
  173.          }
  174.  
  175.          var2 = null;
  176.       } catch (Throwable var7) {
  177.          throw var7;
  178.       }
  179.  
  180.       return var2;
  181.    }
  182.  
  183.    public lotus.domino.ViewEntry getNextEntry() throws NotesException {
  184.       ((NotesBase)this).CheckObject();
  185.       synchronized(this){}
  186.  
  187.       lotus.domino.ViewEntry var1;
  188.       try {
  189.          int var4 = this.NgetNextEntry(this.currEntry);
  190.          if (var4 != 0) {
  191.             this.currEntry = new ViewEntry(this, var4, (CollectionPos)null);
  192.             var1 = this.currEntry;
  193.             return var1;
  194.          }
  195.  
  196.          var1 = null;
  197.       } catch (Throwable var6) {
  198.          throw var6;
  199.       }
  200.  
  201.       return var1;
  202.    }
  203.  
  204.    public lotus.domino.ViewEntry getPrevEntry() throws NotesException {
  205.       ((NotesBase)this).CheckObject();
  206.       synchronized(this){}
  207.  
  208.       lotus.domino.ViewEntry var1;
  209.       try {
  210.          int var4 = this.NgetPrevEntry(this.currEntry);
  211.          if (var4 != 0) {
  212.             this.currEntry = new ViewEntry(this, var4, (CollectionPos)null);
  213.             var1 = this.currEntry;
  214.             return var1;
  215.          }
  216.  
  217.          var1 = null;
  218.       } catch (Throwable var6) {
  219.          throw var6;
  220.       }
  221.  
  222.       return var1;
  223.    }
  224.  
  225.    public lotus.domino.ViewEntry getEntry(Object var1) throws NotesException {
  226.       ((NotesBase)this).CheckObject();
  227.       synchronized(this){}
  228.  
  229.       lotus.domino.ViewEntry var2;
  230.       try {
  231.          if (var1 == null) {
  232.             throw new NotesException(4447, "missing_viewentry_or_document_object");
  233.          }
  234.  
  235.          int var5 = this.NgetEntry(var1);
  236.          if (var5 != 0) {
  237.             this.currEntry = new ViewEntry(this, var5, (CollectionPos)null);
  238.             var2 = this.currEntry;
  239.             return var2;
  240.          }
  241.  
  242.          var2 = null;
  243.       } catch (Throwable var7) {
  244.          throw var7;
  245.       }
  246.  
  247.       return var2;
  248.    }
  249.  
  250.    public void addEntry(Object var1) throws NotesException {
  251.       ((NotesBase)this).CheckObject();
  252.       synchronized(this){}
  253.  
  254.       try {
  255.          if (var1 == null) {
  256.             throw new NotesException(4447, JavaString.resource.getString("missing_viewentry_or_document_object"));
  257.          }
  258.  
  259.          this.NaddEntry(var1);
  260.       } catch (Throwable var4) {
  261.          throw var4;
  262.       }
  263.  
  264.    }
  265.  
  266.    public void addEntry(Object var1, boolean var2) throws NotesException {
  267.       this.addEntry(var1);
  268.    }
  269.  
  270.    public void deleteEntry(lotus.domino.ViewEntry var1) throws NotesException {
  271.       ((NotesBase)this).CheckObject();
  272.       synchronized(this){}
  273.  
  274.       try {
  275.          if (var1 == null) {
  276.             throw new NotesException(4446, JavaString.resource.getString("missing_viewentry_object"));
  277.          }
  278.  
  279.          this.NdeleteEntry((ViewEntry)var1);
  280.       } catch (Throwable var4) {
  281.          throw var4;
  282.       }
  283.  
  284.    }
  285.  
  286.    public void FTSearch(String var1) throws NotesException {
  287.       this.FTSearch(var1, 0);
  288.    }
  289.  
  290.    public void FTSearch(String var1, int var2) throws NotesException {
  291.       ((NotesBase)this).CheckObject();
  292.       synchronized(this){}
  293.  
  294.       try {
  295.          this.NFTSearch(var1, var2);
  296.       } catch (Throwable var5) {
  297.          throw var5;
  298.       }
  299.  
  300.    }
  301.  
  302.    public void removeAll(boolean var1) throws NotesException {
  303.       ((NotesBase)this).CheckObject();
  304.       this.NremoveAll(var1);
  305.    }
  306.  
  307.    public void updateAll() throws NotesException {
  308.       ((NotesBase)this).CheckObject();
  309.       synchronized(this){}
  310.  
  311.       try {
  312.          this.NupdateAll();
  313.       } catch (Throwable var3) {
  314.          throw var3;
  315.       }
  316.  
  317.    }
  318.  
  319.    public void stampAll(String var1, Object var2) throws NotesException {
  320.       ((NotesBase)this).CheckObject();
  321.       synchronized(this){}
  322.  
  323.       try {
  324.          this.NstampAll(var1, var2);
  325.       } catch (Throwable var5) {
  326.          throw var5;
  327.       }
  328.  
  329.    }
  330.  
  331.    public void putAllInFolder(String var1) throws NotesException {
  332.       ((NotesBase)this).CheckObject();
  333.       synchronized(this){}
  334.  
  335.       try {
  336.          this.NputAllInFolder(var1);
  337.       } catch (Throwable var4) {
  338.          throw var4;
  339.       }
  340.  
  341.    }
  342.  
  343.    public void removeAllFromFolder(String var1) throws NotesException {
  344.       ((NotesBase)this).CheckObject();
  345.       synchronized(this){}
  346.  
  347.       try {
  348.          this.NremoveAllFromFolder(var1);
  349.       } catch (Throwable var4) {
  350.          throw var4;
  351.       }
  352.  
  353.    }
  354.  
  355.    public int getCount() throws NotesException {
  356.       ((NotesBase)this).CheckObject();
  357.       synchronized(this){}
  358.  
  359.       int var1;
  360.       try {
  361.          var1 = ((NotesBase)this).PropGetInt(2030);
  362.       } catch (Throwable var5) {
  363.          throw var5;
  364.       }
  365.  
  366.       return var1;
  367.    }
  368.  
  369.    public String getQuery() throws NotesException {
  370.       ((NotesBase)this).CheckObject();
  371.       synchronized(this){}
  372.  
  373.       String var1;
  374.       try {
  375.          var1 = ((NotesBase)this).PropGetString(2032);
  376.       } catch (Throwable var5) {
  377.          throw var5;
  378.       }
  379.  
  380.       return var1;
  381.    }
  382.  
  383.    public lotus.domino.View getParent() throws NotesException {
  384.       ((NotesBase)this).CheckObject();
  385.       return this.parentView;
  386.    }
  387. }
  388.