View Javadoc

1   /*
2    * This file is part of Domingo
3    * an Open Source Java-API to Lotus Notes/Domino
4    * hosted at http://domingo.sourceforge.net
5    *
6    * Copyright (c) 2003-2007 Beck et al. projects GmbH Munich, Germany (http://www.bea.de)
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   * License as published by the Free Software Foundation; either
11   * version 2.1 of the License, or (at your option) any later version.
12   *
13   * This library is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   * Lesser General Public License for more details.
17   *
18   * You should have received a copy of the GNU Lesser General Public
19   * License along with this library; if not, write to the Free Software
20   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21   */
22  
23  package de.bea.domingo;
24  
25  import java.util.List;
26  
27  /***
28   * Represents a view entry.
29   * A view entry describes a row in a view.
30   *
31   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
32   */
33  public interface DViewEntry extends DBase {
34  
35      /***
36       * The value of each column in the view entry.
37       *
38       * @return list of Double, java.util.Calendar, or String.
39       */
40      List getColumnValues();
41  
42      /***
43       * The document associated with the view entry.
44       *
45       * <p>Returns null if the view entry is not a document. Returns null if the
46       * document is deleted after the ViewEntry object is created.</p>
47       *
48       * @return the document.
49       */
50      DDocument getDocument();
51  
52      /***
53       * Indicates whether a view entry is a category.
54       *
55       * @return <code>true</code> if the entry is a category,
56       *         <code>false</code> if the entry is not a category
57       */
58      boolean isCategory();
59  
60      /***
61       * Indicates whether a view entry is a document.
62       *
63       * @return <code>true</code> if the entry is a document,
64       *         <code>false</code> if the entry is not a document
65       */
66      boolean isDocument();
67  
68      /***
69       * Indicates whether a view entry is a total.
70       *
71       * @return <code>true</code> if the entry is a total,
72       *         <code>false</code> if the entry is not a total
73       */
74      boolean isTotal();
75  
76      /***
77       * @return unid.
78       */
79      String getUniversalID();
80  
81      /***
82       * The number of immediate children belonging to the current view entry.
83       *
84       * @return number of immediate children belonging to the current view entry
85       */
86      int getChildCount();
87  
88      /***
89       * Indicates if a view entry is for a document on which a replication or
90       * save conflict occurred.
91       *
92       * @return <code>true</code> if the entry is a conflict document,
93       *         <code>false</code> if the entry is not a conflict document
94       */
95      boolean isConflict();
96  
97      /***
98       * The number of descendants belonging to the current view entry.
99       *
100      * @return number of descendants
101      * @since domingo 1.1
102      */
103     int getDescendantCount();
104 
105     /***
106      * The number of siblings belonging to the current view entry.
107      *
108      * <p>The sibling count includes the current entry unless it is a total.</p>
109      *
110      * @return number of siblings
111      * @since domingo 1.1
112      */
113     int getSiblingCount();
114 
115     /***
116      * The number of siblings belonging to the current view entry.
117      *
118      * <p>The sibling count includes the current entry unless it is a total.</p>
119      *
120      * @return number of siblings
121      * @since domingo 1.1
122      * @deprecated use method {@link #getSiblingCount()} instead
123      */
124     int getSibblingCount();
125 
126     /***
127      * The indent level of a view entry within the view.
128      *
129      * <p>The indent level corresponds to the number of levels in the position.
130      * Position 1 is indent level 0, position 1.1 is indent level 1,
131      * position 1.1.1 is indent level 2, and so on.</p>
132      *
133      * @return indent level
134      * @since domingo 1.1
135      */
136     int getIndentLevel();
137 
138     /***
139      * Indicates whether a view entry is a valid entry and not a deletion stub.
140      *
141      * <p>If a document is removed after a view entry collection containing it
142      * is created, you can use the corresponding view entry for navigation but
143      * cannot access the document. If the possibility of removal exists, you
144      * should check isValid before attempting to access the document.</p>
145      *
146      * @return <code>true</code> if a view entry is a valid entry and not a
147      *         deletion stub
148      * @since domingo 1.1
149      */
150     boolean isValid();
151 
152     /***
153      * The note ID of a view entry of type document.
154      * <p>This property returns the empty string for entries of type category and total.</p>
155      * @return noteID
156      * @since domingo 1.1
157      */
158     String getNoteID();
159 
160     /***
161      * Returns the position of the entry in the view hierarchy, for example,
162      * <tt>"2.3"</tt> for the third document of the second category.
163      *
164      * @param seperator The separator to be used in the return value.
165      * @return A series of integers (in String format) and separators. The
166      *         integers indicate the positions of the view entry at each
167      *         level, where 1 is the first position. The first integer
168      *         indicates the first level and so on.
169      * @since domingo 1.1
170      */
171     String getPosition(char seperator);
172 }