|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.core.values.ValueImpl
public abstract class ValueImpl
Implements the Value interface and provides a number of default accessors for easy development. All accessors by default throw a ValueFormatException, so you will want to implement those which you can convert to.
Field Summary | |
---|---|
protected org.priha.core.values.ValueImpl.VALUE_STATE |
m_state
|
Constructor Summary | |
---|---|
protected |
ValueImpl()
|
Method Summary | |
---|---|
protected void |
checkStream()
This method makes sure that the Value value is a stream, not a value. |
protected void |
checkValue()
This method makes sure that the Value value is a value, not a stream. |
int |
compareTo(ValueImpl value)
By default, does String comparison, which means it may fail. |
boolean |
equals(java.lang.Object o)
|
boolean |
getBoolean()
|
java.util.Calendar |
getDate()
|
double |
getDouble()
|
long |
getLong()
|
java.io.InputStream |
getStream()
By default, returns the inputstream of the String representation. |
java.lang.String |
getString()
|
java.lang.String |
toString()
|
java.lang.String |
valueAsString()
Allows getting the Value as a String without regard to the current Stream/Value format setting. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jcr.Value |
---|
getType |
Field Detail |
---|
protected org.priha.core.values.ValueImpl.VALUE_STATE m_state
Constructor Detail |
---|
protected ValueImpl()
Method Detail |
---|
protected final void checkStream() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If this is a value Value.protected final void checkValue() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If this is a stream value.public boolean getBoolean() throws javax.jcr.ValueFormatException, java.lang.IllegalStateException, javax.jcr.RepositoryException
getBoolean
in interface javax.jcr.Value
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
public java.util.Calendar getDate() throws javax.jcr.ValueFormatException, java.lang.IllegalStateException, javax.jcr.RepositoryException
getDate
in interface javax.jcr.Value
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
public double getDouble() throws javax.jcr.ValueFormatException, java.lang.IllegalStateException, javax.jcr.RepositoryException
getDouble
in interface javax.jcr.Value
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
public long getLong() throws javax.jcr.ValueFormatException, java.lang.IllegalStateException, javax.jcr.RepositoryException
getLong
in interface javax.jcr.Value
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
public java.io.InputStream getStream() throws java.lang.IllegalStateException, javax.jcr.RepositoryException
getStream
in interface javax.jcr.Value
java.lang.IllegalStateException
javax.jcr.RepositoryException
public java.lang.String getString() throws javax.jcr.ValueFormatException, java.lang.IllegalStateException, javax.jcr.RepositoryException
getString
in interface javax.jcr.Value
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String valueAsString()
public int compareTo(ValueImpl value)
compareTo
in interface java.lang.Comparable<ValueImpl>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |