| java.lang.Object com.sun.kvem.midp.pim.AbstractPIMItem
All known Subclasses: com.sun.kvem.midp.pim.ToDoImpl, com.sun.kvem.midp.pim.ContactImpl, com.sun.kvem.midp.pim.EventImpl,
AbstractPIMItem | abstract public class AbstractPIMItem implements PIMItem(Code) | | Partial implementation of PIMItem.
Extended by ContactImpl, EventImpl and ToDoImpl.
|
Method Summary | |
public void | addBinary(int field, int attributes, byte[] value, int offset, int length) | public void | addBoolean(int field, int attributes, boolean value) | public void | addDate(int field, int attributes, long value) | public void | addInt(int field, int attributes, int value) | public void | addString(int field, int attributes, String value) | public void | addStringArray(int field, int attributes, String[] value) | public void | addToCategory(String category) | public void | commit() | static RuntimeException | complaintAboutField(int type, int field) Throw an exception based on field failure type. | public int | countValues(int field) | protected String | formatData() Format the data for output. | public int | getAttributes(int field, int index) | public byte[] | getBinary(int field, int index) | public boolean | getBoolean(int field, int index) | public String[] | getCategories() | String[] | getCategoriesRaw() | public long | getDate(int field, int index) | abstract PIMFormat | getEncodingFormat() Gets the format codec used to encode and decode this object
for storage. | PIMField | getField(int field, boolean create, boolean check) Gets the field entry. | public PIMField | getField(int key) Looks up a PIMField. | public int[] | getFields() | public int | getInt(int field, int index) | Object | getKey() | public PIMList | getPIMList() | public Object | getPIMListHandle() Returns the handle of the PIMList associated with this item.
the handle of the PIMList that this item belongs to. | abstract protected int | getRevisionField() Gets the field that corresponds to the REVISION of this PIMItem. | public String | getString(int field, int index) | public String[] | getStringArray(int field, int index) | abstract protected int | getUIDField() Gets the field that corresponds to the UID of this PIMItem. | boolean | isInCategory(String category) Checks the category is valid. | public boolean | isModified() | static boolean | isValidPIMField(int type, int field) Checks for valid PIM field. | public int | maxCategories() | public void | putField(int key, PIMField field) Stores a PIMField. | void | remove() | public void | removeField(int key) Removes a PIMField. | public void | removeFromCategory(String category) | public void | removeValue(int field, int index) | public void | setBinary(int field, int index, int attributes, byte[] value, int offset, int length) | public void | setBoolean(int field, int index, int attributes, boolean value) | public void | setDate(int field, int index, int attributes, long value) | protected void | setDefaultValues() Sets default values for this item. | public void | setInt(int field, int index, int attributes, int value) | void | setKey(Object key) | void | setModified(boolean modified) Sets the modified flag. | void | setPIMList(AbstractPIMList list) Set the PIMList of this item. | public void | setString(int field, int index, int attributes, String value) | public void | setStringArray(int field, int index, int attributes, String[] value) | abstract protected String | toDisplayableString() Converts the record to a printable format. | public String | toString() Convert the data to a String. |
AbstractPIMItem | protected AbstractPIMItem(AbstractPIMList pimList, int type)(Code) | | Constructs a PIM list.
Parameters: pimList - initial list Parameters: type - type of list |
AbstractPIMItem | protected AbstractPIMItem(AbstractPIMList pimList, PIMItem baseItem)(Code) | | This constructor is used when importing an item.
Parameters: pimList - initial list Parameters: baseItem - initial entry |
addBinary | public void addBinary(int field, int attributes, byte[] value, int offset, int length)(Code) | | |
addBoolean | public void addBoolean(int field, int attributes, boolean value)(Code) | | |
addDate | public void addDate(int field, int attributes, long value)(Code) | | |
addInt | public void addInt(int field, int attributes, int value)(Code) | | |
addString | public void addString(int field, int attributes, String value)(Code) | | |
addStringArray | public void addStringArray(int field, int attributes, String[] value)(Code) | | |
complaintAboutField | static RuntimeException complaintAboutField(int type, int field)(Code) | | Throw an exception based on field failure type.
Parameters: type - list type Parameters: field - identifier of field UnsupportedFieldException if the field value is not supportedin the field or IllegalArgumentException, if the field is not valid |
countValues | public int countValues(int field)(Code) | | |
formatData | protected String formatData()(Code) | | Format the data for output.
formatted data |
getAttributes | public int getAttributes(int field, int index)(Code) | | |
getBinary | public byte[] getBinary(int field, int index)(Code) | | |
getBoolean | public boolean getBoolean(int field, int index)(Code) | | |
getDate | public long getDate(int field, int index)(Code) | | |
getEncodingFormat | abstract PIMFormat getEncodingFormat()(Code) | | Gets the format codec used to encode and decode this object
for storage.
an instance of PIMFormat that can deal with this item |
getField | PIMField getField(int field, boolean create, boolean check)(Code) | | Gets the field entry.
Parameters: field - identifier for the field Parameters: create - if true create the fieldif it doesn't already exist Parameters: check - if true check that the field issupported before attempting to get it the request field entry |
getField | public PIMField getField(int key)(Code) | | Looks up a PIMField. O(log fieldKeys.length) in time.
Parameters: key - property key for requested field PIM field requested |
getFields | public int[] getFields()(Code) | | |
getInt | public int getInt(int field, int index)(Code) | | |
getKey | Object getKey()(Code) | | Gets the key that identifies this item in the PIM database
an Object used to index this item |
getPIMListHandle | public Object getPIMListHandle()(Code) | | Returns the handle of the PIMList associated with this item.
the handle of the PIMList that this item belongs to. If theitem does not belong to any list, handle of default dummylist is returned. |
getRevisionField | abstract protected int getRevisionField()(Code) | | Gets the field that corresponds to the REVISION of this PIMItem.
REVISION fields have special handling; they are set automatically
on commit and import, and are read only to the application once
the item has been committed.
revision field |
getString | public String getString(int field, int index)(Code) | | |
getStringArray | public String[] getStringArray(int field, int index)(Code) | | |
getUIDField | abstract protected int getUIDField()(Code) | | Gets the field that corresponds to the UID of this PIMItem.
UIDfields have special handling; they are set automatically
on commit and import.
UID field |
isInCategory | boolean isInCategory(String category)(Code) | | Checks the category is valid.
Parameters: category - name of category to check true if is int category |
isModified | public boolean isModified()(Code) | | |
isValidPIMField | static boolean isValidPIMField(int type, int field)(Code) | | Checks for valid PIM field.
Parameters: type - list type Parameters: field - identifier for field true if field is valid |
maxCategories | public int maxCategories()(Code) | | |
putField | public void putField(int key, PIMField field)(Code) | | Stores a PIMField. O(fieldKeys.length) in space and time.
Parameters: key - property key for requested field Parameters: field - identifier of field |
removeField | public void removeField(int key)(Code) | | Removes a PIMField. O(fieldKeys.length) in space and time.
Parameters: key - property key for requested field |
removeFromCategory | public void removeFromCategory(String category)(Code) | | |
removeValue | public void removeValue(int field, int index)(Code) | | |
setBinary | public void setBinary(int field, int index, int attributes, byte[] value, int offset, int length)(Code) | | |
setBoolean | public void setBoolean(int field, int index, int attributes, boolean value)(Code) | | |
setDate | public void setDate(int field, int index, int attributes, long value)(Code) | | |
setDefaultValues | protected void setDefaultValues()(Code) | | Sets default values for this item.
|
setInt | public void setInt(int field, int index, int attributes, int value)(Code) | | |
setKey | void setKey(Object key)(Code) | | Sets the key that identifies this item in the PIM database
Parameters: key - an Object used to index this item |
setModified | void setModified(boolean modified)(Code) | | Sets the modified flag.
Parameters: modified - flag to be saved |
setPIMList | void setPIMList(AbstractPIMList list)(Code) | | Set the PIMList of this item.
Parameters: list - data to be saved |
setString | public void setString(int field, int index, int attributes, String value)(Code) | | |
setStringArray | public void setStringArray(int field, int index, int attributes, String[] value)(Code) | | |
toDisplayableString | abstract protected String toDisplayableString()(Code) | | Converts the record to a printable format.
formatted record |
toString | public String toString()(Code) | | Convert the data to a String.
formatted data |
|
|