|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.rmi.value.NameValue
public class NameValue
The NameValue class implements the committed value state for
Name values as a part of the State design pattern (Gof) used by this package.
| Constructor Summary | |
|---|---|
protected |
NameValue(String value)
Creates an instance for the given name value. |
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares values as defined in the JCR specification. |
Binary |
getBinary()
Returns the binary representation of this value. |
boolean |
getBoolean()
Always throws a ValueFormatException. |
Calendar |
getDate()
Always throws a ValueFormatException. |
BigDecimal |
getDecimal()
Always throws a ValueFormatException. |
double |
getDouble()
Always throws a ValueFormatException. |
long |
getLong()
Always throws a ValueFormatException. |
InputStream |
getStream()
Returns the stream representation of this value. |
String |
getString()
Returns the string representation of the Name value. |
int |
getType()
Returns PropertyType.NAME. |
protected ValueFormatException |
getValueFormatException(String destType)
Returns a ValueFormatException with a message indicating
what kind of type conversion is not supported. |
int |
hashCode()
Returns a hash code that's in line with how the equals(Object)
method is implemented. |
String |
toString()
Returns a string representation of this value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected NameValue(String value)
throws ValueFormatException
value.
ValueFormatException| Method Detail |
|---|
public int getType()
PropertyType.NAME.
public String getString()
throws RepositoryException
RepositoryException
public final InputStream getStream()
throws RepositoryException
Binary instance
returned by getBinary().
getStream in interface ValueRepositoryException - if the stream can not be created
public Binary getBinary()
throws RepositoryException
Value.getString(). Subclasses
getBinary in interface ValueRepositoryException
public boolean getBoolean()
throws ValueFormatException
ValueFormatException. Implementations should
overwrite if conversion to boolean is supported.
getBoolean in interface ValueValueFormatException - If the value cannot be converted to a
boolean.
public Calendar getDate()
throws ValueFormatException
ValueFormatException. Implementations should
overwrite if conversion to Calender is supported.
getDate in interface ValueValueFormatException - If the value cannot be converted to a
Calendar instance.
public BigDecimal getDecimal()
throws RepositoryException
ValueFormatException. Implementations should
overwrite if conversion to a BigDecimal is supported.
getDecimal in interface ValueValueFormatException - If the value cannot be converted to a
BigDecimal.
RepositoryException
public double getDouble()
throws ValueFormatException
ValueFormatException. Implementations should
overwrite if conversion to double is supported.
getDouble in interface ValueValueFormatException - If the value cannot be converted to a
double.
public long getLong()
throws ValueFormatException
ValueFormatException. Implementations should
overwrite if conversion to long is supported.
getLong in interface ValueValueFormatException - If the value cannot be converted to a
long.protected ValueFormatException getValueFormatException(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 boolean equals(Object object)
equals in class Objectobject - value for comparison
true if the values are equal,
false otherwisepublic int hashCode()
equals(Object)
method is implemented.
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||