Compoze Software, Inc.

com.compoze.domino
Class AbstractItem


java.lang.Object

  |

  +--com.compoze.domino.AbstractItem

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractDocument, AddressBook, Folder, Profile

public abstract class AbstractItem
extends java.lang.Object
implements java.io.Serializable

This class represents a Domino item, which can either be a document or a folder. An item contains any number of properties that correspond to properties or the results of a method call on the message or folder in Domino. Accessor methods for the properties do not modify of retrieve from the server immediately. For changes to be committed the serverUpdate method must be called. Properties must be explicitly loaded into the item before they can be accessed. This is done by specifying the desired properties when the item is initially created.

See Also:
Serialized Form

Field Summary
protected  PropertyValue[] m_props
           
protected  Session m_session
           
 
Method Summary
 PropertyValue get(PropertyKey key)
          Gets the value of a property from the item.
 boolean getBoolean(PropertyKey key)
          Gets a boolean property from the item.
 java.util.Date getDate(PropertyKey key)
          Gets a date property from the item.
 java.util.Date[] getDateArray(PropertyKey key)
          Gets a date array property from the item.
 double getDouble(PropertyKey key)
          Gets a double property from the item.
 int getInt(PropertyKey key)
          Gets an int property from the item.
 PropertyKey[] getPropertyKeys()
          Gets the keys of all of the currently loaded properties.
 java.lang.String getString(PropertyKey key)
          Gets a String property from the item.
 java.lang.String[] getStringArray(PropertyKey key)
          Gets a String array property from the item.
protected  PropertyValue[] getUpdatedPropertyValues()
          Gets the updated property values.
abstract  void serverUpdate()
          Queries the server to update any changed properties.
 void set(PropertyValue value)
          Sets the value of a property, or adds a new value if it is not already set.
 void setBoolean(PropertyKey key, boolean bValue)
          Sets the boolean value of a property.
 void setDate(PropertyKey key, java.util.Date date)
          Sets the date value of a property.
 void setDouble(PropertyKey key, double dValue)
          Sets the double value of a property.
 void setInt(PropertyKey key, int iValue)
          Sets the int value of a property.
 void setString(PropertyKey key, java.lang.String sValue)
          Sets the string value of a property.
 void setStringArray(PropertyKey key, java.lang.String[] arrayValue)
          Sets a String array property from the item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_session


protected Session m_session

m_props


protected PropertyValue[] m_props
Method Detail

get


public PropertyValue get(PropertyKey key)
Gets the value of a property from the item.
Parameters:
key - the property key
Returns:
the property value, or null if the property is not loaded

set


public void set(PropertyValue value)
Sets the value of a property, or adds a new value if it is not already set. The property value is flagged as updated.
Parameters:
value - the property value

setString


public void setString(PropertyKey key,
                      java.lang.String sValue)
               throws DominoException
Sets the string value of a property.
Parameters:
key - the property key
sValue - the string value
Throws:
DominoException - if the property key's value type is not a string

setStringArray


public void setStringArray(PropertyKey key,
                           java.lang.String[] arrayValue)
                    throws DominoException
Sets a String array property from the item.
Parameters:
key - the property key
arrayValue - the string array value
Returns:
the string array value
Throws:
DominoException - if the property key is not found

setInt


public void setInt(PropertyKey key,
                   int iValue)
            throws DominoException
Sets the int value of a property.
Parameters:
key - the property key
iValue - the int value
Throws:
DominoException - if the property key's value type is not an int

setDouble


public void setDouble(PropertyKey key,
                      double dValue)
               throws DominoException
Sets the double value of a property.
Parameters:
key - the property key
dValue - the double value
Throws:
DominoException - if the property key's value type is not an int

getString


public java.lang.String getString(PropertyKey key)
                           throws DominoException
Gets a String property from the item.
Parameters:
key - the property key
Returns:
the string value
Throws:
DominoException - if the property key is not found

getStringArray


public java.lang.String[] getStringArray(PropertyKey key)
                                  throws DominoException
Gets a String array property from the item.
Parameters:
key - the property key
Returns:
the string array value
Throws:
DominoException - if the property key is not found

getInt


public int getInt(PropertyKey key)
           throws DominoException
Gets an int property from the item.
Parameters:
key - the property key
Returns:
the int value
Throws:
DominoException - if the property key is not found

getDouble


public double getDouble(PropertyKey key)
                 throws DominoException
Gets a double property from the item.
Parameters:
key - the property key
Returns:
the double value
Throws:
DominoException - if the property key is not found

getBoolean


public boolean getBoolean(PropertyKey key)
                   throws DominoException
Gets a boolean property from the item.
Parameters:
key - the property key
Returns:
the boolean value
Throws:
DominoException - if the property key is not found

setBoolean


public void setBoolean(PropertyKey key,
                       boolean bValue)
                throws DominoException
Sets the boolean value of a property.
Parameters:
key - the property key
bValue - the boolean value
Throws:
DominoException - if the property key's value type is not an int

setDate


public void setDate(PropertyKey key,
                    java.util.Date date)
             throws DominoException
Sets the date value of a property.
Parameters:
key - the property key
date - the date
Throws:
DominoException - if the property key's value type is not an int

getDate


public java.util.Date getDate(PropertyKey key)
                       throws DominoException
Gets a date property from the item.
Parameters:
key - the property key
Returns:
the date value
Throws:
DominoException - if the property key is not found

getDateArray


public java.util.Date[] getDateArray(PropertyKey key)
                              throws DominoException
Gets a date array property from the item.
Parameters:
key - the property key
Returns:
the date array value
Throws:
DominoException - if the property key is not found

getUpdatedPropertyValues


protected PropertyValue[] getUpdatedPropertyValues()
Gets the updated property values.
Returns:
an array of the updated property values, or null if no properties have been updated

getPropertyKeys


public PropertyKey[] getPropertyKeys()
Gets the keys of all of the currently loaded properties.
Returns:
an array containing the keys of all of the currently loaded properties

serverUpdate


public abstract void serverUpdate()
                           throws DominoException
Queries the server to update any changed properties.

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.