Skip navigation links

Oracle® WebCenter Content Java API Reference for Imaging
11g Release 1 (11.1.1)

E12853-03


oracle.imaging
Class SearchValue

java.lang.Object
  extended by oracle.imaging.SearchValue

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SearchValue>

public class SearchValue
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<SearchValue>

SearchValue is an abstract classs to allow the use of multiple value types defined by the concrete subclasses. This class provides default behavior that is overridden by the concrete classes to provide type-specific behavior.

See Also:
Serialized Form

Nested Class Summary
static class SearchValue.Type
          Enum for the various search value types in the app.

 

Field Summary
protected  SearchValue.Type searchValueType
          The Type designated for the instance.

 

Constructor Summary
SearchValue()
          Default Constructor required for JAXB serialization.
SearchValue(SearchValue.Type type, java.lang.Object value)
          Set the Type and the value object.
SearchValue(SearchValue value)
          Constructor with a SearchValue.
SearchValue(TypedValue value)
          Constructor with a TypedValue.

 

Method Summary
 int compareTo(SearchValue o)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 SearchValue.Type getSearchValueType()
          Returns the search value type.
 java.lang.String getStringValue()
          Returns the typed value's string value.
 java.lang.String getTypedString()
          Returns "TYPE: VALUE", which is what toString() used to do.
 java.lang.Object getValue()
          Returns the underlying typedValue's core object.
 int hashCode()
          Returns a hash code value for the object.
 void setValue(java.lang.Object value)
          Sets the underlying value object.
 java.lang.String toString()
          Now returns the typed value's string value to make picklist usage simpler.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

searchValueType

protected SearchValue.Type searchValueType
The Type designated for the instance.

Constructor Detail

SearchValue

public SearchValue()
Default Constructor required for JAXB serialization.

SearchValue

public SearchValue(SearchValue.Type type,
                   java.lang.Object value)
Set the Type and the value object. An internal TypedValue is created to hold both.
Parameters:
type - The new Type
value - The value object
Throws:
java.lang.IllegalArgumentException - if the FieldType derived from the value object isn't compatible with the SearchValue.Type.

SearchValue

public SearchValue(SearchValue value)
Constructor with a SearchValue. The contents are used from the value to initialize the new instance. Essentially: a copy.
Parameters:
value -

SearchValue

public SearchValue(TypedValue value)
Constructor with a TypedValue. The contents are used from the value to update the internal TypedValue instance, but its reference is not changed.
Parameters:
value -

Method Detail

getSearchValueType

public SearchValue.Type getSearchValueType()
Returns the search value type.
Returns:
the SearchValueType

setValue

public void setValue(java.lang.Object value)
Sets the underlying value object. Can be a SearchValue, a TypedValue, or an Object. If the Type in the TypedValue differs from that which is already set on this SearchValue, the SearchValue's Type will be updated to match.
Parameters:
value -

getValue

public java.lang.Object getValue()
Returns the underlying typedValue's core object.

getStringValue

public java.lang.String getStringValue()
Returns the typed value's string value.
See Also:
getTypedString()

toString

public java.lang.String toString()
Now returns the typed value's string value to make picklist usage simpler. If you need the old "TYPE: VALUE" string, use getTypedString() instead.
Overrides:
toString in class java.lang.Object
See Also:
getTypedString()

getTypedString

public java.lang.String getTypedString()
Returns "TYPE: VALUE", which is what toString() used to do.

compareTo

public int compareTo(SearchValue o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Specified by:
compareTo in interface java.lang.Comparable<SearchValue>
Parameters:
o - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this object.

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
object - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

Skip navigation links

Oracle® WebCenter Content Java API Reference for Imaging
11g Release 1 (11.1.1)

E12853-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.