|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.jcr.rmi.api.value.BaseNonStreamValue
public abstract class BaseNonStreamValue
The BaseNonStreamValue class implements the basic committed value state for
non-stream values as a part of the State design pattern (Gof) used by this package.
This class implements all methods of the
rmi.api.value.StatefullValue except getString
and getType interface by always throwing an appropriate exception. Extensions of
this class should overwrite methods as appropriate except for the getStream() which must
throw an IllegalStateException for this line of committed non-stream states.
| Field Summary | |
|---|---|
protected int |
orderNumber
|
| Constructor Summary | |
|---|---|
protected |
BaseNonStreamValue()
Default constructor with no special tasks. |
| Method Summary | |
|---|---|
boolean |
getBoolean()
Always throws a ValueFormatException. |
java.util.Calendar |
getDate()
Always throws a ValueFormatException. |
double |
getDouble()
Always throws a ValueFormatException. |
long |
getLong()
Always throws a ValueFormatException. |
int |
getOrderNumber()
|
java.lang.String |
getReference()
|
java.io.InputStream |
getStream()
Always throws IllegalStateException because only non-stream getters are available
from this implementation. |
protected javax.jcr.ValueFormatException |
getValueFormatException(java.lang.String destType)
Returns a ValueFormatException with a message indicating what kind of type
conversion is not supported. |
void |
setOrderNumber(int orderNumber)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exoplatform.services.jcr.core.value.ExtendedValue |
|---|
getLength |
| Methods inherited from interface javax.jcr.Value |
|---|
getString, getType |
| Field Detail |
|---|
protected int orderNumber
| Constructor Detail |
|---|
protected BaseNonStreamValue()
| Method Detail |
|---|
public int getOrderNumber()
getOrderNumber in interface ExtendedValuepublic void setOrderNumber(int orderNumber)
setOrderNumber in interface ExtendedValue
public java.io.InputStream getStream()
throws java.lang.IllegalStateException
IllegalStateException because only non-stream getters are available
from this implementation.
This method is declared final to mark that this line of implementations does not provide access
to InputStreams.
getStream in interface javax.jcr.Valuejava.lang.IllegalStateException - as defined above.
public boolean getBoolean()
throws javax.jcr.ValueFormatException
ValueFormatException. Implementations should overwrite if
conversion to boolean is supported.
getBoolean in interface javax.jcr.Valuejavax.jcr.ValueFormatException - If the value cannot be converted to a boolean.
public java.util.Calendar getDate()
throws javax.jcr.ValueFormatException
ValueFormatException. Implementations should overwrite if
conversion to Calender is supported.
getDate in interface javax.jcr.Valuejavax.jcr.ValueFormatException - If the value cannot be converted to a Calendar instance.
public double getDouble()
throws javax.jcr.ValueFormatException
ValueFormatException. Implementations should overwrite if
conversion to double is supported.
getDouble in interface javax.jcr.Valuejavax.jcr.ValueFormatException - If the value cannot be converted to a double.
public long getLong()
throws javax.jcr.ValueFormatException
ValueFormatException. Implementations should overwrite if
conversion to long is supported.
getLong in interface javax.jcr.Valuejavax.jcr.ValueFormatException - If the value cannot be converted to a long.protected javax.jcr.ValueFormatException getValueFormatException(java.lang.String destType)
ValueFormatException with a message indicating what kind of type
conversion is not supported.
destType - The name of the value type to which this value cannot be converted.
public java.lang.String getReference()
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
getReference in interface ExtendedValuejavax.jcr.ValueFormatException - , IllegalStateException, RepositoryException
java.lang.IllegalStateException
javax.jcr.RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||