FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface Value

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Choice, Choice

public interface Value
extends java.io.Serializable

A Value object is a value associated with a Property object. A property's value is either a simple Java type (such as int) or an object. If the value is an object, that object can either be a scalar object (such as a Document, Folder, etc.), or a collection of values held in a Values collection.

If a property's value is a Values collection, the property is termed a multi-valued property. Each Value object in the collection is of the same type (you cannot have a multi-valued property consisting of heterogeneous data types).

To instantiate a Value object, call the getValueObject method on a Property object. If you are working with a multi-valued property, you can create empty Value objects to use in a Values collection. For more information, see the Values interface.

See Also:
CS Java Connector Developer's Guide

Method Summary
 boolean equals(java.lang.Object o)
          

Not Implemented in CS Java Connector v3.0.

 byte[] getBinaryValue()
          For convenience, returns this Value object cast or converted to a byte array.
 boolean getBooleanValue()
          For convenience, returns this Value object cast or converted to a boolean.
 java.util.Date getDateValue()
          For convenience, returns this Value object cast or converted to a Date.
 double getDoubleValue()
          For convenience, returns this Value object cast or converted to a double.
 int getIntValue()
          For convenience, returns this Value object cast or converted to an int.
 java.lang.String getStringValue()
          For convenience, returns this Value object cast or converted to a String.
 int getType()
          Returns the data type for this Value object.
 java.lang.Object getValue()
          Returns the value associated with this Value object.
 Values getValuesValue()
          For convenience, returns this Value object cast or converted to a Values collection.
 int hashCode()
          

Not Implemented in CS Java Connector v3.0.

 boolean hasNullValue()
          Reports whether the value of this Value object is null or not.
 void setValue(boolean boolValue)
          Sets the value of this Value object to the specified boolean value.
 void setValue(java.lang.Boolean boolValue)
          Sets the value of this Value object to the specified Boolean value.
 void setValue(byte[] byteArrayValue)
          Sets the value of this Value object to the specified byte array value.
 void setValue(java.util.Date dateTimeValue)
          Sets the value of this Value object to the specified Date value.
 void setValue(double float64Value)
          Sets the value of this Value object to the specified double value.
 void setValue(java.lang.Double float64Value)
          Sets the value of this Value object to the specified Double value.
 void setValue(int intValue)
          Sets the value of this Value object to the specified integer value.
 void setValue(java.lang.Integer intValue)
          Sets the value of this Value object to the specified Integer value.
 void setValue(java.lang.String stringValue)
          Sets the value of this Value object to the specified String value.
 void setValue(ValueObject objectValue)
          Sets the value of this Value object to the specified ValueObject object.
 

Method Detail

getValue

public java.lang.Object getValue()
Returns the value associated with this Value object.

Returns:
An object that is the value associated with this Value object. For multi-valued properties, the returned object is a Values collection.

hasNullValue

public boolean hasNullValue()
Reports whether the value of this Value object is null or not. A value is typically null when a property's value has not been set in the Content Services server. For values that represent Java objects, you can simply get the value and test against null. For primitive types, where null cannot be returned, the get[type]Value methods return a default value. Use the hasNullValue method to distinguish between the two cases.

Returns:
true if the value of this Value object is null (or an empty string, if this Value object is a String); otherwise returns false.

getBinaryValue

public byte[] getBinaryValue()
For convenience, returns this Value object cast or converted to a byte array.

Returns:
A byte array that is the value associated with this Value object.

getBooleanValue

public boolean getBooleanValue()
For convenience, returns this Value object cast or converted to a boolean.

Returns:
A boolean that is the value associated with this Value object. Returns false in the case of a null value.

getDateValue

public java.util.Date getDateValue()
For convenience, returns this Value object cast or converted to a Date.

Returns:
A Date that is the value associated with this Value object.

getDoubleValue

public double getDoubleValue()
For convenience, returns this Value object cast or converted to a double.

Returns:
A double that is the value associated with this Value object. Returns Double.NaN in the case of a null value.

getIntValue

public int getIntValue()
For convenience, returns this Value object cast or converted to an int.

Returns:
An int that is the value associated with this Value object. Returns Integer.MIN_VALUE in the case of a null value.

getStringValue

public java.lang.String getStringValue()
For convenience, returns this Value object cast or converted to a String.

Returns:
A String that is the value associated with this Value object.

getValuesValue

public Values getValuesValue()
For convenience, returns this Value object cast or converted to a Values collection.

Returns:
A Values collection that is the value associated with this Value object.

getType

public int getType()
Returns the data type for this Value object.

Returns:
An integer that specifies the data type for this Value object. See the Property interface's TYPE_ constants for the possible returned values.
Throws:
java.lang.NullPointerException - Thrown if Value is null or TYPE_UNSPECIFIED.

setValue

public void setValue(byte[] byteArrayValue)
Sets the value of this Value object to the specified byte array value.

Parameters:
byteArrayValue - Specifies the value to set for this Value object.

setValue

public void setValue(java.lang.Integer intValue)
Sets the value of this Value object to the specified Integer value.

Parameters:
intValue - Specifies the value to set for this Value object.

setValue

public void setValue(int intValue)
Sets the value of this Value object to the specified integer value.

Parameters:
intValue - Specifies the value to set for this Value object.

setValue

public void setValue(java.lang.String stringValue)
Sets the value of this Value object to the specified String value.

Parameters:
stringValue - Specifies the value to set for this Value object.

setValue

public void setValue(java.lang.Double float64Value)
Sets the value of this Value object to the specified Double value.

Parameters:
float64Value - Specifies the value to set for this Value object. If Double.NaN, sets the value to null; if Double.POSITIVE_INFINITY, sets the value to Double.MAX_VALUE; if Double.NEGATIVE_INFINITY, sets the value to -Double.MAX_VALUE (i.e., negative Double.MAX_VALUE).

setValue

public void setValue(double float64Value)
Sets the value of this Value object to the specified double value.

Parameters:
float64Value - Specifies the value to set for this Value object. If Double.NaN, sets the value to null; if Double.POSITIVE_INFINITY, sets the value to Double.MAX_VALUE; if Double.NEGATIVE_INFINITY, sets the value to -Double.MAX_VALUE (i.e., negative Double.MAX_VALUE).

setValue

public void setValue(ValueObject objectValue)
Sets the value of this Value object to the specified ValueObject object.

Parameters:
objectValue - Specifies the value to set for this Value object.

setValue

public void setValue(java.util.Date dateTimeValue)
Sets the value of this Value object to the specified Date value. Date values for properties are limited to the range 1 January 1753 and 31 December 2078, inclusive.

Parameters:
dateTimeValue - Specifies the value to set for this Value object.

setValue

public void setValue(java.lang.Boolean boolValue)
Sets the value of this Value object to the specified Boolean value.

Parameters:
boolValue - Specifies the value to set for this Value object.

setValue

public void setValue(boolean boolValue)
Sets the value of this Value object to the specified boolean value.

Parameters:
boolValue - Specifies the value to set for this Value object.

equals

public boolean equals(java.lang.Object o)

Not Implemented in CS Java Connector v3.0.

Indicates whether some other Value object is logically equal to this Value object, meaning that the two Value objects have the same data type and contain the same value. For example, use this method to discover whether a value is already contained in a Values collection. This method returns true if both of the following conditions are met:

Note that this method does not check the dirty status of a value (that is, whether the property's value has changed since it was last retrieved from the server).

Parameters:
o - The Value object with which to compare.

Returns:
true if this Value object is logically equal to the Value object specified in the o argument; otherwise false.

hashCode

public int hashCode()

Not Implemented in CS Java Connector v3.0.

Returns an integer for the hash code for this Value object. The hash code is used for storing and retrieving a reference to this object in a Hashtable data structure.

Returns:
The hash code for this Value object.

FileNet Content Services
Java Connector v3.0