com.flexive.shared.cmis.search
Class CmisResultValue<T>

java.lang.Object
  extended by com.flexive.shared.cmis.search.CmisResultValue<T>
All Implemented Interfaces:
java.io.Serializable

public abstract class CmisResultValue<T>
extends java.lang.Object
implements java.io.Serializable

Disclaimer: this API is part of the CMIS interface and is not yet considered stable.

A boxed column value in a CMIS result set. You can access the boxed value with getValue(), the equals(Object) and toString() functions will be forwarded to the boxed instance (unless it is null).

Since:
3.1
Version:
$Rev$
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
protected CmisResultValue(T value)
           
 
Method Summary
(package private) static CmisResultValue createResultValue(java.lang.Object value)
           
 boolean equals(java.lang.Object obj)
           
 BinaryDescriptor getBinary()
          Return the BinaryDescriptor of a binary column.
 byte getByte()
          Return the value as a Byte.
 java.util.Date getDate()
          Return the value as a Date.
 double getDouble()
          Return the value as a Double.
 float getFloat()
          Return the value as a Float.
 FxValue getFxValue()
          Return the value as a FxValue.
 int getInt()
          Return the value as a Integer.
 long getLong()
          Return the value as a Long.
protected  java.lang.Number getNumberValue()
          Helper method for the getXXX methods that returns the boxed value as a Number, or throws a runtime exception if the boxed value is not a Number.
 FxPaths getPaths()
          Return the node path(s) selected with the ParentId property.
 FxPK getPk()
          Return the primary key of a content selected with the ObjectId property.
 java.lang.String getString()
          Return the value as a String.
 T getValue()
           
 java.util.Collection<T> getValues()
           
 int hashCode()
           
 boolean isAggregate()
           
 boolean isEmpty()
          Return "true" if this value is considered to be empty because the database did not return a valiue, e.g.
 java.lang.String toString()
           
protected  java.lang.Object unboxValue()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmisResultValue

protected CmisResultValue(T value)
Method Detail

createResultValue

static CmisResultValue createResultValue(java.lang.Object value)

isAggregate

public boolean isAggregate()

getValue

public T getValue()

getValues

public java.util.Collection<T> getValues()

isEmpty

public boolean isEmpty()
Return "true" if this value is considered to be empty because the database did not return a valiue, e.g. a null value.

Returns:
"true" if this value is considered to be empty

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

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

hashCode

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

getByte

public byte getByte()
Return the value as a Byte. If isEmpty() is true, a FxRuntimeException is thrown.

Returns:
the value as a Byte.

getInt

public int getInt()
Return the value as a Integer. If isEmpty() is true, a FxRuntimeException is thrown.

Returns:
the value as a Integer.

getLong

public long getLong()
Return the value as a Long. If isEmpty() is true, a FxRuntimeException is thrown.

Returns:
the value as a Long.

getFloat

public float getFloat()
Return the value as a Float. If isEmpty() is true, a FxRuntimeException is thrown.

Returns:
the value as a Float.

getDouble

public double getDouble()
Return the value as a Double. If isEmpty() is true, a FxRuntimeException is thrown.

Returns:
the value as a Double.

getDate

public java.util.Date getDate()
Return the value as a Date.

Returns:
the value as a Date.

getString

public java.lang.String getString()
Return the value as a String. If the boxed value is not a String, the result of the toString() method is returned.

Returns:
the value as a String.

getBinary

public BinaryDescriptor getBinary()
Return the BinaryDescriptor of a binary column.

Returns:
the BinaryDescriptor of a binary column.

getFxValue

public FxValue getFxValue()
Return the value as a FxValue. Note that CMIS queries return primitive values by default, in this case this method will throw a ClassCastException.

Returns:
the value as a FxValue

getPaths

public FxPaths getPaths()
Return the node path(s) selected with the ParentId property.

Returns:
the node path(s) selected with the ParentId property.

getPk

public FxPK getPk()
Return the primary key of a content selected with the ObjectId property.

Returns:
the primary key of a content selected with the ObjectId property.

getNumberValue

protected java.lang.Number getNumberValue()
Helper method for the getXXX methods that returns the boxed value as a Number, or throws a runtime exception if the boxed value is not a Number.

Returns:
the boxed value as a number

unboxValue

protected java.lang.Object unboxValue()