org.exoplatform.services.jcr.rmi.api.value
Class NameValue
java.lang.Object
org.exoplatform.services.jcr.rmi.api.value.BaseNonStreamValue
org.exoplatform.services.jcr.rmi.api.value.NameValue
- All Implemented Interfaces:
- java.io.Serializable, javax.jcr.Value, ExtendedValue, StatefulValue
public class NameValue
- extends BaseNonStreamValue
- implements java.io.Serializable, StatefulValue
The NameValue class implements the committed value state for Name 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 |
NameValue(java.lang.String value)
Creates an instance for the given name value. |
|
Method Summary |
long |
getLength()
|
int |
getOrderNumber()
|
java.lang.String |
getString()
Returns the string representation of the Name value. |
int |
getType()
Returns PropertyType.NAME. |
protected static java.lang.String |
toName(java.lang.String value)
Checks whether the string value adheres to the name 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 |
NameValue
protected NameValue(java.lang.String value)
throws javax.jcr.ValueFormatException
- Creates an instance for the given name
value.
- Throws:
javax.jcr.ValueFormatException
toName
protected static java.lang.String toName(java.lang.String value)
throws javax.jcr.ValueFormatException
- Checks whether the string value adheres to the name syntax.
- Parameters:
value - The string to check for synthactical compliance with a name value.
- Returns:
- The input value.
- Throws:
javax.jcr.ValueFormatException - if the string value is not a synthactically correct name.
getType
public int getType()
- Returns
PropertyType.NAME.
- 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 Name 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.