home *** CD-ROM | disk | FTP | other *** search
- package lotus.notes;
-
- import java.util.Enumeration;
- import java.util.Vector;
-
- public class View extends NotesBase {
- private transient Database database;
- private transient Vector columns;
-
- private native void Nclear();
-
- private native int NFTSearch(String var1, int var2);
-
- private native int NgetChild(Document var1);
-
- private native int NgetDocumentByKey(Vector var1, boolean var2);
-
- private native int NgetAllDocumentsByKey(Vector var1, boolean var2);
-
- private native int NgetFirstDocument();
-
- private native int NgetLastDocument();
-
- private native int NgetNextDocument(Document var1);
-
- private native int NgetNextSibling(Document var1);
-
- private native int NgetNthDocument(int var1);
-
- private native int NgetParentDocument(Document var1);
-
- private native int NgetPrevDocument(Document var1);
-
- private native int NgetPrevSibling(Document var1);
-
- private native void Nrefresh();
-
- private native void Nremove();
-
- protected View() throws NotesException {
- }
-
- protected View(Database var1, int var2) throws NotesException {
- super(var2, 3);
- if (var1 == null) {
- throw new NotesException(JavaString.resource.getString("missing_db_object"));
- } else {
- this.database = var1;
- this.columns = new Vector(3);
- var1.AddView(this);
- }
- }
-
- protected void InternalFinalize() throws NotesException {
- try {
- Enumeration var3 = this.columns.elements();
-
- while(var3.hasMoreElements()) {
- ViewColumn var4 = (ViewColumn)var3.nextElement();
- super.DestroyObject(var4);
- }
- } catch (Exception var7) {
- } finally {
- this.columns.removeAllElements();
- super.finalize();
- }
-
- }
-
- public void finalize() throws NotesException {
- this.database.RemoveView(this);
- this.InternalFinalize();
- }
-
- protected void AddColumn(ViewColumn var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- Vector var2 = this.columns;
- synchronized(var2){}
-
- try {
- this.columns.addElement(var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- protected void RemoveColumn(ViewColumn var1) throws NotesException {
- Vector var2 = this.columns;
- synchronized(var2){}
-
- try {
- this.columns.removeElement(var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- protected ViewColumn FindOrCreateColumn(int var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- if (var1 == 0) {
- return null;
- } else {
- Vector var4 = this.columns;
- synchronized(var4){}
-
- ViewColumn var3;
- try {
- Enumeration var6 = this.columns.elements();
-
- ViewColumn var2;
- do {
- if (!var6.hasMoreElements()) {
- var3 = new ViewColumn(this, var1);
- return var3;
- }
-
- var2 = (ViewColumn)var6.nextElement();
- } while(!((NotesBase)var2).isEqual(var1));
-
- var3 = var2;
- } catch (Throwable var8) {
- throw var8;
- }
-
- return var3;
- }
- }
-
- public void recycle() throws NotesException {
- try {
- this.database.RemoveView(this);
- Enumeration var3 = this.columns.elements();
-
- while(var3.hasMoreElements()) {
- ViewColumn var4 = (ViewColumn)var3.nextElement();
- super.RecycleObject(var4);
- }
- } catch (NotesException var7) {
- } finally {
- this.columns.removeAllElements();
- super.Recycle();
- }
-
- }
-
- public int GetCppObj() {
- return super.GetCppObj();
- }
-
- public void clear() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.Nclear();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
-
- public int FTSearch(String var1, int var2) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- int var3;
- try {
- var3 = this.NFTSearch(var1, var2);
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var3;
- }
-
- public int FTSearch(String var1) throws NotesException {
- return this.FTSearch(var1, 0);
- }
-
- public Document getChild(Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetChild(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public Document getDocumentByKey(Vector var1) throws NotesException {
- return this.getDocumentByKey(var1, false);
- }
-
- public Document getDocumentByKey(Vector var1, boolean var2) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var3;
- try {
- var3 = this.database.FindOrCreateDocument(this.NgetDocumentByKey(var1, var2));
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var3;
- }
-
- public Document getDocumentByKey(Object var1) throws NotesException {
- Vector var2 = new Vector(1);
- var2.addElement(var1);
- return this.getDocumentByKey(var2, false);
- }
-
- public Document getDocumentByKey(Object var1, boolean var2) throws NotesException {
- Vector var3 = new Vector(1);
- var3.addElement(var1);
- return this.getDocumentByKey(var3, var2);
- }
-
- public DocumentCollection getAllDocumentsByKey(Vector var1) throws NotesException {
- return this.getAllDocumentsByKey(var1, false);
- }
-
- public DocumentCollection getAllDocumentsByKey(Vector var1, boolean var2) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- DocumentCollection var3;
- try {
- var3 = this.database.FindOrCreateDocCollection(this.NgetAllDocumentsByKey(var1, var2));
- } catch (Throwable var7) {
- throw var7;
- }
-
- return var3;
- }
-
- public DocumentCollection getAllDocumentsByKey(Object var1) throws NotesException {
- Vector var2 = new Vector(1);
- var2.addElement(var1);
- return this.getAllDocumentsByKey(var2, false);
- }
-
- public DocumentCollection getAllDocumentsByKey(Object var1, boolean var2) throws NotesException {
- Vector var3 = new Vector(1);
- var3.addElement(var1);
- return this.getAllDocumentsByKey(var3, var2);
- }
-
- public Document getFirstDocument() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var1;
- try {
- var1 = this.database.FindOrCreateDocument(this.NgetFirstDocument());
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public Document getLastDocument() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var1;
- try {
- var1 = this.database.FindOrCreateDocument(this.NgetLastDocument());
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public Document getNextDocument(Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetNextDocument(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public Document getNextSibling(Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetNextSibling(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public Document getNthDocument(int var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetNthDocument(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public Document getParentDocument(Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetParentDocument(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public Document getPrevDocument(Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetPrevDocument(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public Document getPrevSibling(Document var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Document var2;
- try {
- var2 = this.database.FindOrCreateDocument(this.NgetPrevSibling(var1));
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var2;
- }
-
- public void refresh() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.Nrefresh();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
-
- public void remove() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- this.Nremove();
- this.database.RemoveView(this);
- super.cpp_object = 0;
- this.finalize();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
-
- public DateTime getCreated() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- DateTime var1;
- try {
- var1 = this.database.getParent().FindOrCreateDateTime(((NotesBase)this).PropGetDate(1282));
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public DateTime getLastModified() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- DateTime var1;
- try {
- var1 = this.database.getParent().FindOrCreateDateTime(((NotesBase)this).PropGetDate(1281));
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public String getName() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- String var1;
- try {
- var1 = ((NotesBase)this).PropGetString(1280);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public String toString() {
- String var1;
- try {
- var1 = this.getName();
- } catch (Exception var2) {
- var1 = null;
- }
-
- return var1;
- }
-
- public String getUniversalID() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- String var1;
- try {
- var1 = ((NotesBase)this).PropGetString(1283);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public Database getParent() throws NotesException {
- ((NotesBase)this).CheckObject();
- return this.database;
- }
-
- public boolean isDefaultView() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- boolean var1;
- try {
- var1 = ((NotesBase)this).PropGetBool(1285);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public boolean isFolder() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- boolean var1;
- try {
- var1 = ((NotesBase)this).PropGetBool(1287);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public Vector getColumns() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Vector var1;
- try {
- int[] var4 = ((NotesBase)this).PropGetObjArray(1286);
- if (var4.length != 0) {
- Vector var7 = new Vector(var4.length);
-
- for(int var6 = 0; var6 < var4.length; ++var6) {
- ViewColumn var5 = this.FindOrCreateColumn(var4[var6]);
- var7.addElement(var5);
- }
-
- var1 = var7;
- return var1;
- }
-
- var1 = null;
- } catch (Throwable var9) {
- throw var9;
- }
-
- return var1;
- }
-
- public Vector getReaders() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Vector var2;
- try {
- String[] var5 = ((NotesBase)this).PropGetStringArray(1302);
- Vector var1;
- if (var5 != null && var5.length > 0) {
- var1 = new Vector(var5.length, 1);
-
- for(int var6 = 0; var6 < var5.length; ++var6) {
- var1.addElement(var5[var6]);
- }
- } else {
- var1 = new Vector(1);
- }
-
- var2 = var1;
- } catch (Throwable var8) {
- throw var8;
- }
-
- return var2;
- }
-
- public void setReaders(Vector var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- ((NotesBase)this).PropSetVector(1302, var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public boolean isAutoUpdate() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- boolean var1;
- try {
- var1 = ((NotesBase)this).PropGetBool(1303);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public void setAutoUpdate(boolean var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- ((NotesBase)this).PropSetBool(1303, var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public Vector getAliases() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- Vector var2;
- try {
- String[] var5 = ((NotesBase)this).PropGetStringArray(1304);
- Vector var1;
- if (var5 != null && var5.length > 0) {
- var1 = new Vector(var5.length, 1);
-
- for(int var6 = 0; var6 < var5.length; ++var6) {
- var1.addElement(var5[var6]);
- }
- } else {
- var1 = new Vector(1);
- }
-
- var2 = var1;
- } catch (Throwable var8) {
- throw var8;
- }
-
- return var2;
- }
-
- public boolean isCalendar() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- boolean var1;
- try {
- var1 = ((NotesBase)this).PropGetBool(1305);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public boolean isProtectReaders() throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- boolean var1;
- try {
- var1 = ((NotesBase)this).PropGetBool(1309);
- } catch (Throwable var5) {
- throw var5;
- }
-
- return var1;
- }
-
- public void setProtectReaders(boolean var1) throws NotesException {
- ((NotesBase)this).CheckObject();
- synchronized(this){}
-
- try {
- ((NotesBase)this).PropSetBool(1309, var1);
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
- }
-