Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Class ProfileFieldValue

java.lang.Object
  extended by com.jivesoftware.community.ProfileFieldValue

public class ProfileFieldValue
extends java.lang.Object

This class represents a possible value for a ProfileField. A ProfileField can contain either a single value, in the case of a radio button or text field, or a list of values, in the case of checkboxes or multiselect fields. If the ProfileField can contain multiple values, they will be stored as a LongList of option IDs where each option ID represents the corresponding ProfileFieldOption. Otherwise the value will be stored as a String.

See Also:
ProfileField, ProfileFieldOption, UserProfile

Constructor Summary
ProfileFieldValue(long fieldID)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getCachedSize()
          Returns the estimated cache size for this object.
 long getFieldID()
          Returns the ID of the ProfileField for this value.
 com.jivesoftware.util.LongList getOptionIDs()
          Gets a list of the selected options.
 java.lang.String getStringValue()
          Gets the value for this ProfileField.
 int hashCode()
           
 void readExternal(java.io.DataInput in)
           
 void setOptionIDs(com.jivesoftware.util.LongList optionIDs)
          Sets a list of selected optionIDs.
 void setStringValue(java.lang.String value)
          Sets the value for this field.
 void writeExternal(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileFieldValue

public ProfileFieldValue(long fieldID)
Method Detail

getFieldID

public long getFieldID()
Returns the ID of the ProfileField for this value.

Returns:
the ID of the ProfileField for this value.

getOptionIDs

public com.jivesoftware.util.LongList getOptionIDs()
Gets a list of the selected options. If the ProfileField does not have a List of ProfileFieldOptions defined, then the value will be stored as a String and this method will return null.

Returns:
a list of the selected options or null if no options have been selected.

setOptionIDs

public void setOptionIDs(com.jivesoftware.util.LongList optionIDs)
Sets a list of selected optionIDs. If the ProfileField does not have a List of ProfileFieldOptions defined, then the value should be stored as a String and this method should be set to null.

Parameters:
optionIDs - the list of selected options.

getStringValue

public java.lang.String getStringValue()
Gets the value for this ProfileField. If the ProfileField has a set of ProfileFieldOptions, the value(s) will be stored as a List of optionIDs and this method will return null.

Returns:
the value for this field.

setStringValue

public void setStringValue(java.lang.String value)
Sets the value for this field. If the ProfileField has a set of ProfileFieldOptions, the value(s) should be stored as a List of optionIDs and this method should be set to null.

Parameters:
value - the value for this field.

getCachedSize

public int getCachedSize()
Returns the estimated cache size for this object.

Returns:
the estimated cache size for his object.

readExternal

public void readExternal(java.io.DataInput in)
                  throws java.io.IOException
Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.DataOutput out)
                   throws java.io.IOException
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Clearspace Project Page

Copyright © 1999-2007 Jive Software.