org.exoplatform.services.jcr.rmi.api.value
Class ReferenceValue
java.lang.Object
org.exoplatform.services.jcr.rmi.api.value.BaseNonStreamValue
org.exoplatform.services.jcr.rmi.api.value.ReferenceValue
- All Implemented Interfaces:
- java.io.Serializable, javax.jcr.Value, ExtendedValue, StatefulValue
public class ReferenceValue
- extends BaseNonStreamValue
- implements java.io.Serializable, StatefulValue
The ReferenceValue class implements the committed value state for Reference values
as a part of the State design pattern (Gof) used by this package.
- Since:
- 0.16.4.1
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
ReferenceValue(java.lang.String value)
Creates an instance for the given reference value. |
|
Method Summary |
long |
getLength()
|
int |
getOrderNumber()
|
java.lang.String |
getReference()
|
java.lang.String |
getString()
Returns the string representation of the reference value. |
int |
getType()
Returns PropertyType.REFERENCE. |
protected static java.lang.String |
toReference(java.lang.String value)
Checks whether the string value adheres to the reference syntax. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.Value |
getBoolean, getDate, getDouble, getLong, getStream |
ReferenceValue
protected ReferenceValue(java.lang.String value)
throws javax.jcr.ValueFormatException
- Creates an instance for the given reference
value.
- Throws:
javax.jcr.ValueFormatException
getReference
public java.lang.String getReference()
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
- Specified by:
getReference in interface ExtendedValue- Overrides:
getReference in class BaseNonStreamValue
- Throws:
javax.jcr.ValueFormatException - , IllegalStateException, RepositoryException
java.lang.IllegalStateException
javax.jcr.RepositoryException
toReference
protected static java.lang.String toReference(java.lang.String value)
throws javax.jcr.ValueFormatException
- Checks whether the string value adheres to the reference syntax.
- Parameters:
value - The string to check for synthactical compliance with a reference value.
- Returns:
- The input value.
- Throws:
javax.jcr.ValueFormatException - if the string value is not a synthactically correct reference.
getType
public int getType()
- Returns
PropertyType.REFERENCE.
- Specified by:
getType in interface javax.jcr.Value
getString
public java.lang.String getString()
throws javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
- Returns the string representation of the reference value.
- Specified by:
getString in interface javax.jcr.Value
- Throws:
javax.jcr.ValueFormatException
javax.jcr.RepositoryException
getLength
public long getLength()
- Specified by:
getLength in interface ExtendedValue
getOrderNumber
public int getOrderNumber()
- Specified by:
getOrderNumber in interface ExtendedValue- Overrides:
getOrderNumber in class BaseNonStreamValue
Copyright © 2012 eXo Platform SAS. All Rights Reserved.