home *** CD-ROM | disk | FTP | other *** search
- package lotus.domino.local;
-
- import lotus.domino.NotesException;
- import lotus.notes.JavaString;
-
- public class DocumentCollection extends NotesBase implements lotus.domino.DocumentCollection {
- private transient Database database;
- private transient Document currDoc;
-
- private native int NgetFirstDocument();
-
- private native int NgetLastDocument();
-
- private native int NgetNextDocument(Document var1);
-
- private native int NgetPrevDocument(Document var1);
-
- private native int NgetNthDocument(int var1);
-
- private native void NFTSearch(String var1, int var2);
-
- private native void NremoveAll(boolean var1);
-
- private native void NupdateAll();
-
- private native void NstampAll(String var1, Object var2);
-
- private native void NputAllInFolder(String var1);
-
- private native void NremoveAllFromFolder(String var1);
-
- private native int NgetDocument(Document var1);
-
- private native void NaddDocument(Document var1);
-
- private native void NdeleteDocument(Document var1);
-
- protected DocumentCollection() throws NotesException {
- }
-
- protected DocumentCollection(Database var1, int var2) throws NotesException {
- super(var2, 11);
- if (var1 == null) {
- throw new NotesException(4405, JavaString.resource.getString("missing_db_object"));
- } else {
- this.database = var1;
- var1.AddObject(this);
- }
- }
-
- protected void InternalFinalize() throws NotesException {
- super.finalize();
- }
-
- public void finalize() throws NotesException {
- this.database.RemoveObject(this);
- this.InternalFinalize();
- }
-
- public void recycle() throws NotesException {
- try {
- this.database.RemoveObject(this);
- } catch (NotesException var5) {
- } finally {
- super.Recycle();
- }
-
- }
-
- public lotus.domino.Document getFirstDocument() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var1;
- try {
- Document var4 = this.database.FindOrCreateDocument(this.NgetFirstDocument());
- if (var4 != null) {
- this.currDoc = var4;
- }
-
- var1 = var4;
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var1;
- }
-
- public lotus.domino.Document getLastDocument() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var1;
- try {
- Document var4 = this.database.FindOrCreateDocument(this.NgetLastDocument());
- if (var4 != null) {
- this.currDoc = var4;
- }
-
- var1 = var4;
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var1;
- }
-
- public lotus.domino.Document getNextDocument(lotus.domino.Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- if (var1 == null) {
- throw new NotesException(4406, JavaString.resource.getString("missing_document_object"));
- }
-
- Document var5 = this.database.FindOrCreateDocument(this.NgetNextDocument((Document)var1));
- if (var5 != null) {
- this.currDoc = var5;
- }
-
- var2 = var5;
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var2;
- }
-
- public lotus.domino.Document getPrevDocument(lotus.domino.Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- if (var1 == null) {
- throw new NotesException(4406, JavaString.resource.getString("missing_document_object"));
- }
-
- Document var5 = this.database.FindOrCreateDocument(this.NgetPrevDocument((Document)var1));
- if (var5 != null) {
- this.currDoc = var5;
- }
-
- var2 = var5;
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var2;
- }
-
- public lotus.domino.Document getNthDocument(int var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- Document var5 = this.database.FindOrCreateDocument(this.NgetNthDocument(var1));
- if (var5 != null) {
- this.currDoc = var5;
- }
-
- var2 = var5;
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var2;
- }
-
- public lotus.domino.Document getNextDocument() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- lotus.domino.Document var1;
- try {
- if (this.currDoc != null) {
- Document var4 = this.database.FindOrCreateDocument(this.NgetNextDocument(this.currDoc));
- if (var4 != null) {
- this.currDoc = var4;
- }
-
- var1 = var4;
- return var1;
- }
-
- var1 = null;
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var1;
- }
-
- public lotus.domino.Document getPrevDocument() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- lotus.domino.Document var1;
- try {
- if (this.currDoc != null) {
- Document var4 = this.database.FindOrCreateDocument(this.NgetPrevDocument(this.currDoc));
- if (var4 != null) {
- this.currDoc = var4;
- }
-
- var1 = var4;
- return var1;
- }
-
- var1 = null;
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var1;
- }
-
- public lotus.domino.Document getDocument(lotus.domino.Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- if (var1 == null) {
- throw new NotesException(4406, JavaString.resource.getString("missing_document_object"));
- }
-
- Document var5 = this.database.FindOrCreateDocument(this.NgetDocument((Document)var1));
- if (var5 != null) {
- this.currDoc = var5;
- }
-
- var2 = var5;
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var2;
- }
-
- public void addDocument(lotus.domino.Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- if (var1 == null) {
- throw new NotesException(4406, JavaString.resource.getString("missing_document_object"));
- }
-
- this.NaddDocument((Document)var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void addDocument(lotus.domino.Document var1, boolean var2) throws NotesException {
- this.addDocument(var1);
- }
-
- public void deleteDocument(lotus.domino.Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- if (var1 == null) {
- throw new NotesException(4406, JavaString.resource.getString("missing_document_object"));
- }
-
- this.NdeleteDocument((Document)var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void FTSearch(String var1) throws NotesException {
- this.FTSearch(var1, 0);
- }
-
- public void FTSearch(String var1, int var2) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.NFTSearch(var1, var2);
- } catch (Throwable var5) {
- throw var5;
- }
-
- }
-
- public void removeAll(boolean var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- Document var5;
- for(Document var4 = (Document)this.getFirstDocument(); var4 != null; var4 = var5) {
- var5 = (Document)this.getNextDocument(var4);
- var4.finalize();
- }
-
- this.NremoveAll(var1);
- } catch (Throwable var7) {
- throw var7;
- }
-
- }
-
- public void updateAll() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.NupdateAll();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
-
- public void stampAll(String var1, Object var2) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.NstampAll(var1, var2);
- } catch (Throwable var5) {
- throw var5;
- }
-
- }
-
- public void putAllInFolder(String var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.NputAllInFolder(var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void removeAllFromFolder(String var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.NremoveAllFromFolder(var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public int getCount() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- int var1;
- try {
- var1 = ((NotesBase)this).PropGetInt(1330);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public boolean isSorted() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- boolean var1;
- try {
- var1 = ((NotesBase)this).PropGetBool(1331);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public String getQuery() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- String var1;
- try {
- var1 = ((NotesBase)this).PropGetString(1332);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public lotus.domino.Database getParent() throws NotesException {
- ((NotesBase)this).CheckObject();
- return this.database;
- }
- }
-