com.ibm.xsp.model.domino.wrapped
Class DominoViewEntry

java.lang.Object
  extended by com.ibm.xsp.model.domino.wrapped.AbstractDominoViewEntry
      extended by com.ibm.xsp.model.domino.wrapped.DominoViewEntry
All Implemented Interfaces:
ViewRowData, java.io.Externalizable, java.io.Serializable, lotus.domino.Base, lotus.domino.ViewEntry

public class DominoViewEntry
extends AbstractDominoViewEntry
implements ViewRowData

NotesXspViewEntry represents a View Entry in XPages

See Also:
ViewRowData, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.xsp.model.ViewRowData
ViewRowData.ColumnInfo, ViewRowData.ValueColumnInfo
 
Field Summary
protected  java.util.Vector _columnValuesEx
           
protected  DominoViewDataModel _viewDataModel
           
protected  int childCount
           
protected  int columnIndentLevel
           
protected  java.lang.String databaseName
           
protected  int descendantCount
           
protected  int FTSearchScore
           
protected  int indentLevel
           
protected  boolean isCategory
           
protected  boolean isConflict
           
protected  boolean isDocument
           
protected  boolean isTotal
           
protected  boolean isValid
           
protected  java.lang.String noteId
           
static char PATH_SEPARATOR
           
protected  java.lang.String position
           
protected  boolean preferJavaDate
           
protected  int siblingCount
           
protected  java.lang.String UNID
           
 
Fields inherited from class com.ibm.xsp.model.domino.wrapped.AbstractDominoViewEntry
_wrappedObject, javaColumnValues, notesColumnValues, VC_NOT_PRESENT
 
Fields inherited from interface lotus.domino.ViewEntry
TYPE_CATEGORY, TYPE_DOCUMENT, TYPE_TOTAL
 
Constructor Summary
DominoViewEntry()
          Contructor - for Serielization only
DominoViewEntry(java.lang.String databaseName, java.lang.String navPos)
          Create a DominoViewEntry
DominoViewEntry(lotus.domino.ViewEntry wrappedObject, java.lang.String databaseName, java.lang.String navPos)
          Create a DominoViewEntry specifying a ViewEntry to be wrapped
 
Method Summary
 void discardWrappedObject(java.lang.String dataCache)
          Discard the wrapped object, column values and the view data model
 int getChildCount()
          Return the number of immediate children belonging to the current view entry
 int getColumnIndentLevel()
          The indent level of a view entry within its column.
 ViewRowData.ColumnInfo getColumnInfo(java.lang.String name)
          Return the column info for the specified column.
 java.lang.Object getColumnValue(java.lang.String name)
          XPages extended API. Return the value for the specified column name from the View Entry
 java.util.Vector getColumnValuesEx()
          Return Java Columns Values for the View Entry
 java.lang.String getDatabaseName()
          Return the name of Database contain the View this View Entry comes from.
 DominoViewDataModel getDataModel()
          Return the DominoViewDataModel for the ViewEntry
 int getDescendantCount()
          The number of descendants belonging to the current view entry.
 lotus.domino.Document getDocument()
          The document associated with the view entry.
 int getFTSearchScore()
          The full-text search score of a view entry, if it was retrieved as part of a full-text search.
 int getIndentLevel()
          The indent level of a view entry within the view.
 java.lang.String getNavigatorPosition()
          XPages extended API. Get the position of the ViewEntry using '.' as the character separator.
 java.lang.String getNoteID()
          The note ID of a view entry of type document.
 java.lang.Object getParent()
          Return the parent ViewEntryCollection, ViewNavigator, or View object of a view entry.
 java.lang.String getPosition()
          XPages extended API. Get the position of the ViewEntry using '.' as the character separator.
 java.lang.String getPosition(char arg0)
          Returns the position of the entry in the view hierarchy, for example, "2.3" for the third document of the second category.
 boolean getRead()
          Returns true if the current entry has been read, otherwise false.
 boolean getRead(java.lang.String onBehalfOf)
          Returns true if the current entry has been read, otherwise false.
 int getSiblingCount()
          The number of siblings belonging to the current view entry (Read Only).
 java.lang.String getUniversalID()
          The universal ID of a document associated with a view entry.
 java.lang.Object getValue(java.lang.String name)
          Return the value for the specified property.
protected  lotus.domino.View getView()
          Return the View this View Entry is part of.
 boolean isCategory()
          Indicates whether a view entry is a category.
 boolean isConflict()
          Indicates whether a view entry is for a document on which a replication or save conflict occurred.
 boolean isDocument()
          Indicates whether a view entry is a document.
 boolean isExpanded()
          return true if the View Entry has been expanded in the View Panel
 boolean isPreferJavaDates()
          Return whether the View Entry will return Java Dates.
 boolean isReadOnly(java.lang.String name)
          Always returns true
 boolean isSelected()
          returns true is the ViewEntry has been selected in the View Panel
 boolean isTotal()
          Indicates whether a view entry is a total.
 boolean isValid()
          Indicates whether a view entry is a valid entry and not a deletion stub.
 void readExternal(java.io.ObjectInput in)
           
 void recycle()
          The recycle method unconditionally destroys an object and returns its memory to the system.
 void recycle(java.util.Vector arg0)
          The recycle method unconditionally destroys an object and returns its memory to the system.
 void setColumnValue(java.lang.String name, java.lang.Object value)
          Views are readonly data source - does nothing.
 void setDataModel(DominoViewDataModel viewDataModel)
          Set the DominoViewDataModel foe this View Entry
 void setExpanded(boolean expanded)
          add or remove this ViewEntry from the list of expanded rows in the View Data Model.
 void setPreferJavaDates(boolean javaDate)
          Set whether the View Entry will return Java Dates.
 void setSelected(boolean selected)
          adds or removes the ViewEntry from the list of selected ViewEntrys in the View model.
 void toggleExpanded()
          toggle whether this ViewEntry is expanded in the View Data Model
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class com.ibm.xsp.model.domino.wrapped.AbstractDominoViewEntry
clearTransientValues, clearValues, getColumnValues, getDatabase, getId, getJavaColumnValues, getOpenPageURL, getResponseCount, getResponseLevel, getTarget, getViewEntry, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.xsp.model.ViewRowData
getOpenPageURL
 

Field Detail

PATH_SEPARATOR

public static final char PATH_SEPARATOR
See Also:
Constant Field Values

_viewDataModel

protected transient DominoViewDataModel _viewDataModel

_columnValuesEx

protected transient java.util.Vector _columnValuesEx

databaseName

protected java.lang.String databaseName

UNID

protected java.lang.String UNID

noteId

protected java.lang.String noteId

position

protected java.lang.String position

isCategory

protected boolean isCategory

isDocument

protected boolean isDocument

isTotal

protected boolean isTotal

isValid

protected boolean isValid

isConflict

protected boolean isConflict

siblingCount

protected int siblingCount

childCount

protected int childCount

descendantCount

protected int descendantCount

indentLevel

protected int indentLevel

FTSearchScore

protected int FTSearchScore

columnIndentLevel

protected int columnIndentLevel

preferJavaDate

protected boolean preferJavaDate
Constructor Detail

DominoViewEntry

public DominoViewEntry()
Contructor - for Serielization only


DominoViewEntry

public DominoViewEntry(java.lang.String databaseName,
                       java.lang.String navPos)
Create a DominoViewEntry

Parameters:
databaseName - the Database that owns the View the the ViewEntry belongs
navPos - position of the ViewEntry in the View

DominoViewEntry

public DominoViewEntry(lotus.domino.ViewEntry wrappedObject,
                       java.lang.String databaseName,
                       java.lang.String navPos)
                throws lotus.domino.NotesException
Create a DominoViewEntry specifying a ViewEntry to be wrapped

Parameters:
wrappedObject - the ViewEntry to be wrapped
databaseName - the Database that owns the View the the ViewEntry belongs
navPos - position of the ViewEntry in the View
Throws:
lotus.domino.NotesException
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class AbstractDominoViewEntry
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class AbstractDominoViewEntry
Throws:
java.io.IOException
java.lang.ClassNotFoundException

discardWrappedObject

public void discardWrappedObject(java.lang.String dataCache)
Discard the wrapped object, column values and the view data model

Parameters:
dataCache -

getDatabaseName

public java.lang.String getDatabaseName()
                                 throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Return the name of Database contain the View this View Entry comes from. If Database is remote - then name is !!

Overrides:
getDatabaseName in class AbstractDominoViewEntry
Returns:
Return the name of Database contain the View this View Entry comes from.
Throws:
lotus.domino.NotesException

getChildCount

public int getChildCount()
Description copied from class: AbstractDominoViewEntry
Return the number of immediate children belonging to the current view entry

Specified by:
getChildCount in interface lotus.domino.ViewEntry
Overrides:
getChildCount in class AbstractDominoViewEntry

getColumnIndentLevel

public int getColumnIndentLevel()
Description copied from class: AbstractDominoViewEntry
The indent level of a view entry within its column. This property is useful for determining the response level of a document. Main documents are always at indent level 0, response documents at indent level 1, and so on.

Specified by:
getColumnIndentLevel in interface lotus.domino.ViewEntry
Overrides:
getColumnIndentLevel in class AbstractDominoViewEntry

getColumnInfo

public ViewRowData.ColumnInfo getColumnInfo(java.lang.String name)
Description copied from interface: ViewRowData
Return the column info for the specified column.

Specified by:
getColumnInfo in interface ViewRowData
Returns:

getColumnValue

public java.lang.Object getColumnValue(java.lang.String name)
Description copied from class: AbstractDominoViewEntry
XPages extended API. Return the value for the specified column name from the View Entry

Specified by:
getColumnValue in interface ViewRowData
Specified by:
getColumnValue in class AbstractDominoViewEntry
Returns:

setColumnValue

public void setColumnValue(java.lang.String name,
                           java.lang.Object value)
Views are readonly data source - does nothing. (non-Javadoc)

Specified by:
setColumnValue in interface ViewRowData
See Also:
ViewRowData.setColumnValue(java.lang.String, java.lang.Object)

getColumnValuesEx

public java.util.Vector getColumnValuesEx()
                                   throws lotus.domino.NotesException
Return Java Columns Values for the View Entry

Returns:
Java Columns Values for the View Entry
Throws:
lotus.domino.NotesException

getDataModel

public DominoViewDataModel getDataModel()
Return the DominoViewDataModel for the ViewEntry

Returns:

setDataModel

public void setDataModel(DominoViewDataModel viewDataModel)
Set the DominoViewDataModel foe this View Entry

Parameters:
viewDataModel -

getDescendantCount

public int getDescendantCount()
Description copied from class: AbstractDominoViewEntry
The number of descendants belonging to the current view entry.

Specified by:
getDescendantCount in interface lotus.domino.ViewEntry
Overrides:
getDescendantCount in class AbstractDominoViewEntry

getDocument

public lotus.domino.Document getDocument()
                                  throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
The document associated with the view entry. Returns null if the view entry is not a document. Returns null if the document is deleted after the ViewEntry object is created.

Specified by:
getDocument in interface lotus.domino.ViewEntry
Overrides:
getDocument in class AbstractDominoViewEntry
Throws:
lotus.domino.NotesException

getFTSearchScore

public int getFTSearchScore()
Description copied from class: AbstractDominoViewEntry
The full-text search score of a view entry, if it was retrieved as part of a full-text search. The score is determined by the number of target words that are found in the entry, the term weights assigned to the target words, and any proximity operators in the search query. If the entries are not retrieved as part of a full-text search, returns 0. If the entry is retrieved using an FTSearch method on a database without a full-text index, returns an unpredictable number.

Specified by:
getFTSearchScore in interface lotus.domino.ViewEntry
Overrides:
getFTSearchScore in class AbstractDominoViewEntry

getIndentLevel

public int getIndentLevel()
Description copied from class: AbstractDominoViewEntry
The indent level of a view entry within the view. The indent level corresponds to the number of levels in the position. Position 1 is indent level 0, position 1.1 is indent level 1, position 1.1.1 is indent level 2, and so on.

Specified by:
getIndentLevel in interface lotus.domino.ViewEntry
Overrides:
getIndentLevel in class AbstractDominoViewEntry

getNoteID

public java.lang.String getNoteID()
Description copied from class: AbstractDominoViewEntry
The note ID of a view entry of type document. This property returns the empty string for entries of type category and total.

Specified by:
getNoteID in interface lotus.domino.ViewEntry
Overrides:
getNoteID in class AbstractDominoViewEntry

getParent

public java.lang.Object getParent()
                           throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Return the parent ViewEntryCollection, ViewNavigator, or View object of a view entry.

Specified by:
getParent in interface lotus.domino.ViewEntry
Overrides:
getParent in class AbstractDominoViewEntry
Returns:
The parent ViewEntryCollection, ViewNavigator, or View object of a view entry.
Throws:
lotus.domino.NotesException

getNavigatorPosition

public java.lang.String getNavigatorPosition()
Description copied from class: AbstractDominoViewEntry
XPages extended API. Get the position of the ViewEntry using '.' as the character separator. See AbstractDominoViewEntry.getPosition(char)

Overrides:
getNavigatorPosition in class AbstractDominoViewEntry

getPosition

public java.lang.String getPosition()
Description copied from class: AbstractDominoViewEntry
XPages extended API. Get the position of the ViewEntry using '.' as the character separator. See AbstractDominoViewEntry.getPosition(char)

Overrides:
getPosition in class AbstractDominoViewEntry

getPosition

public java.lang.String getPosition(char arg0)
                             throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Returns the position of the entry in the view hierarchy, for example, "2.3" for the third document of the second category.

Specified by:
getPosition in interface lotus.domino.ViewEntry
Overrides:
getPosition in class AbstractDominoViewEntry
Returns:
A series of integers (in String format) and separators. The integers indicate the positions of the view entry at each level, where 1 is the first position. The first integer indicates the first level and so on.
Throws:
lotus.domino.NotesException

getRead

public boolean getRead()
                throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Returns true if the current entry has been read, otherwise false.

Specified by:
getRead in interface lotus.domino.ViewEntry
Overrides:
getRead in class AbstractDominoViewEntry
Throws:
lotus.domino.NotesException
See Also:
ViewEntry.getRead()

getRead

public boolean getRead(java.lang.String onBehalfOf)
                throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Returns true if the current entry has been read, otherwise false.

Specified by:
getRead in interface lotus.domino.ViewEntry
Overrides:
getRead in class AbstractDominoViewEntry
Parameters:
onBehalfOf - If supplied, the username who has or has not read the entry. Otherwise, defaults to the name of the current user.
Returns:
True if the current entry has been read by username. False if it has not been read by username.
Throws:
lotus.domino.NotesException
See Also:
ViewEntry.getRead(java.lang.String)

getSiblingCount

public int getSiblingCount()
Description copied from class: AbstractDominoViewEntry
The number of siblings belonging to the current view entry (Read Only).

Specified by:
getSiblingCount in interface lotus.domino.ViewEntry
Overrides:
getSiblingCount in class AbstractDominoViewEntry
See Also:
ViewEntry.getSiblingCount()

getUniversalID

public java.lang.String getUniversalID()
Description copied from class: AbstractDominoViewEntry
The universal ID of a document associated with a view entry. The ID is a 32-character combination of hexadecimal digits (0-9, A-F) that uniquely identifies a document across all replicas of a database.

Specified by:
getUniversalID in interface lotus.domino.ViewEntry
Overrides:
getUniversalID in class AbstractDominoViewEntry
See Also:
ViewEntry.getUniversalID()

getValue

public java.lang.Object getValue(java.lang.String name)
Description copied from interface: ViewRowData
Return the value for the specified property.

Specified by:
getValue in interface ViewRowData
Returns:

getView

protected lotus.domino.View getView()
                             throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Return the View this View Entry is part of. View Entry -> View or -> View Navigator -> View

Overrides:
getView in class AbstractDominoViewEntry
Returns:
Return the View this View Entry is part of.
Throws:
lotus.domino.NotesException

isCategory

public boolean isCategory()
Description copied from class: AbstractDominoViewEntry
Indicates whether a view entry is a category.

Specified by:
isCategory in interface lotus.domino.ViewEntry
Overrides:
isCategory in class AbstractDominoViewEntry
See Also:
ViewEntry.isCategory()

isConflict

public boolean isConflict()
Description copied from class: AbstractDominoViewEntry
Indicates whether a view entry is for a document on which a replication or save conflict occurred.

Specified by:
isConflict in interface lotus.domino.ViewEntry
Overrides:
isConflict in class AbstractDominoViewEntry
See Also:
ViewEntry.isConflict()

isDocument

public boolean isDocument()
Description copied from class: AbstractDominoViewEntry
Indicates whether a view entry is a document.

Specified by:
isDocument in interface lotus.domino.ViewEntry
Overrides:
isDocument in class AbstractDominoViewEntry
See Also:
ViewEntry.isDocument()

isReadOnly

public boolean isReadOnly(java.lang.String name)
Always returns true

Specified by:
isReadOnly in interface ViewRowData
Returns:

isSelected

public boolean isSelected()
returns true is the ViewEntry has been selected in the View Panel

Overrides:
isSelected in class AbstractDominoViewEntry

setSelected

public void setSelected(boolean selected)
adds or removes the ViewEntry from the list of selected ViewEntrys in the View model.

Overrides:
setSelected in class AbstractDominoViewEntry

isExpanded

public boolean isExpanded()
return true if the View Entry has been expanded in the View Panel

Overrides:
isExpanded in class AbstractDominoViewEntry

setExpanded

public void setExpanded(boolean expanded)
add or remove this ViewEntry from the list of expanded rows in the View Data Model.

Overrides:
setExpanded in class AbstractDominoViewEntry

toggleExpanded

public void toggleExpanded()
toggle whether this ViewEntry is expanded in the View Data Model

Overrides:
toggleExpanded in class AbstractDominoViewEntry

isTotal

public boolean isTotal()
Description copied from class: AbstractDominoViewEntry
Indicates whether a view entry is a total.

Specified by:
isTotal in interface lotus.domino.ViewEntry
Overrides:
isTotal in class AbstractDominoViewEntry
See Also:
ViewEntry.isTotal()

isValid

public boolean isValid()
Description copied from class: AbstractDominoViewEntry
Indicates whether a view entry is a valid entry and not a deletion stub.

Specified by:
isValid in interface lotus.domino.ViewEntry
Overrides:
isValid in class AbstractDominoViewEntry
See Also:
ViewEntry.isValid()

recycle

public void recycle()
             throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
The recycle method unconditionally destroys an object and returns its memory to the system. Java has no knowledge of the heavyweight back-end Domino Objects, only the lightweight Java objects representing them. Garbage collection has no effect on Domino Objects unless you first explicitly recycle them.

Specified by:
recycle in interface lotus.domino.Base
Overrides:
recycle in class AbstractDominoViewEntry
Throws:
lotus.domino.NotesException
See Also:
Base.recycle()

recycle

public void recycle(java.util.Vector arg0)
             throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
The recycle method unconditionally destroys an object and returns its memory to the system. The vector contains the Domino Objects to be recycled. This method effectively batches recycle operations and is especially efficient for remote (IIOP) calls. Java has no knowledge of the heavyweight back-end Domino Objects, only the lightweight Java objects representing them. Garbage collection has no effect on Domino Objects unless you first explicitly recycle them.

Specified by:
recycle in interface lotus.domino.Base
Overrides:
recycle in class AbstractDominoViewEntry
Throws:
lotus.domino.NotesException
See Also:
Base.recycle(java.util.Vector)

isPreferJavaDates

public boolean isPreferJavaDates()
                          throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Return whether the View Entry will return Java Dates.

Specified by:
isPreferJavaDates in interface lotus.domino.ViewEntry
Overrides:
isPreferJavaDates in class AbstractDominoViewEntry
Throws:
lotus.domino.NotesException
See Also:
ViewEntry.isPreferJavaDates()

setPreferJavaDates

public void setPreferJavaDates(boolean javaDate)
                        throws lotus.domino.NotesException
Description copied from class: AbstractDominoViewEntry
Set whether the View Entry will return Java Dates.

Specified by:
setPreferJavaDates in interface lotus.domino.ViewEntry
Overrides:
setPreferJavaDates in class AbstractDominoViewEntry
Throws:
lotus.domino.NotesException
See Also:
ViewEntry.setPreferJavaDates(boolean)