|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.content.Value
public class Value
The value for a Property. The typed value can be null. If you call a getter method for a different data type, such as getLongValue() where the type of the property which contains the value is Property.DOUBLE, the long value should be null. Likewise if you set a value of an incorrect data type the underlying repository will ignore that value. It is specific to the repository and SPI implementor whether or not this is an error condition.
Constructor Summary | |
---|---|
Value() Constructs an empty Value. |
|
Value(BinaryValue binaryValue) Constructs a BinaryValue Value. |
|
Value(Boolean booleanValue) Constructs a Boolean value. |
|
Value(Calendar calendarValue) Constructs a Calendar value. |
|
Value(Double doubleValue) Constructs a Double value. |
|
Value(ID linkedNodeIdValue) Constructs a Link value, which refers to a node. |
|
Value(Long longValue) Constructs a Long value. |
|
Value(Property[] nestedValue) Constructs a nested value. |
|
Value(String stringValue) Constructs a String value. |
Method Summary | |
---|---|
Object |
clone() Clones a value. |
int |
compareTo(Object obj) Compares this Value to the given object. |
boolean |
equals(Object obj) Indicates whether some other value is "equal to" this one. |
BinaryValue |
getBinaryValue() The value as a BinaryValue. |
Boolean |
getBooleanValue() The value as a Boolean. |
Calendar |
getCalendarValue() The value as a Calendar. |
Double |
getDoubleValue() The value as a Double. |
ID |
getLinkValue() The value as a Link node ID. |
Long |
getLongValue() The value as a Long. |
Property[] |
getNestedValue() The value as an array of Property objects, a nested type. |
int |
getOrderedPosition() If multivalued property, the position dictates the order |
String |
getStringValue() The value as a String. |
Object |
getValue() Gets the Value as an Object. |
Object |
getValueByType(int type) Return the correct value based on the type. |
int |
hashCode() Returns a hash code value for this value. |
void |
setOrderedPosition(int position) Set the position dictating the order, if the Value is part of a Value[] on a Property. |
String |
toString() Returns the Value as a String, except if the value is Binary, in which case mimeType, name and size is returned. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Value()
public Value(BinaryValue binaryValue)
binaryValue
- The binary value.public Value(Boolean booleanValue)
booleanValue
- The boolean value.public Value(Calendar calendarValue)
calendarValue
- The calendar value.public Value(Double doubleValue)
doubleValue
- The double value.public Value(ID linkedNodeIdValue)
linkedNodeIdValue
- The linked node id value.public Value(Long longValue)
longValue
- The long value.public Value(String stringValue)
stringValue
- The string value.public Value(Property[] nestedValue)
nestedValue
- The nested value.Method Detail |
---|
public BinaryValue getBinaryValue()
public int getOrderedPosition()
Note: If this Value is set on more than one property, this position cannot be different for each Property. It is best to avoid setting the position if this Value is going to be added to multiple properties.
public void setOrderedPosition(int position)
Note: If this Value is set on more than one property, this position cannot be different for each Property. It is best to avoid setting the position if this Value is going to be added to multiple properties.
position
- The position of this Value in the array of multivalued values, if applicablepublic Boolean getBooleanValue()
public Calendar getCalendarValue()
public Double getDoubleValue()
public ID getLinkValue()
public Long getLongValue()
public String getStringValue()
public Property[] getNestedValue()
Property
objects, a nested type.public Object getValueByType(int type)
type
- The data type of the value as found in the constants in the Property
class.public Object getValue()
public int compareTo(Object obj)
compareTo
in interface Comparable
obj
- the Object
to be compared.0
if the Value
being compared is equal to the argument Object
; a value less than 0
if the Value
being compared is somehow (this varies depending on the specific type of value) less than the argument Object
; and a value greater than 0
if the Value
being compared is somehow greater than the argument Object
(signed comparison).public String toString()
Note: Calendar values will be printed with the default Locale.
If there's a need to print the date in some specific format, call getCalendarValue()
and use a DateFormatter to format the returned Calendar as desired.
toString
in class Object
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- If the clone fails.public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.public int hashCode()
hashCode
in class Object
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.