org.modeshape.jcr
Class JcrValue

java.lang.Object
  extended by org.modeshape.jcr.JcrValue
All Implemented Interfaces:
Value

@NotThreadSafe
public final class JcrValue
extends Object
implements Value

ModeShape implementation of a JCR Value.


Method Summary
protected  Object convertToType(int type, Object value)
           
 boolean equals(Object obj)
          
 Binary getBinary()
          
 boolean getBoolean()
          
 Calendar getDate()
          
 BigDecimal getDecimal()
          
 double getDouble()
          
 long getLong()
          
 InputStream getStream()
          
 String getString()
          
 int getType()
          
 int hashCode()
          
 String toString()
           
 Object value()
          Returns a direct reference to the internal value object wrapped by this JcrValue.
protected  Object valueToType(int type, Value value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

value

public final Object value()
Returns a direct reference to the internal value object wrapped by this JcrValue. Useful to avoid the expense of asType(int) if the caller already knows the type of the value.

Returns:
a reference to the value field.

getBoolean

public boolean getBoolean()
                   throws ValueFormatException

Specified by:
getBoolean in interface Value
Throws:
ValueFormatException
See Also:
Value.getBoolean()

getDate

public Calendar getDate()
                 throws ValueFormatException

Specified by:
getDate in interface Value
Throws:
ValueFormatException
See Also:
Value.getDate()

getDecimal

public BigDecimal getDecimal()
                      throws ValueFormatException,
                             RepositoryException

Specified by:
getDecimal in interface Value
Throws:
ValueFormatException
RepositoryException
See Also:
Value.getDecimal()

getDouble

public double getDouble()
                 throws ValueFormatException

Specified by:
getDouble in interface Value
Throws:
ValueFormatException
See Also:
Value.getDouble()

getLong

public long getLong()
             throws ValueFormatException

Specified by:
getLong in interface Value
Throws:
ValueFormatException
See Also:
Value.getLong()

getStream

public InputStream getStream()
                      throws ValueFormatException

Specified by:
getStream in interface Value
Throws:
ValueFormatException
See Also:
Value.getStream()

getBinary

public Binary getBinary()
                 throws RepositoryException

Specified by:
getBinary in interface Value
Throws:
RepositoryException
See Also:
Value.getBinary()

getString

public String getString()
                 throws ValueFormatException

Specified by:
getString in interface Value
Throws:
ValueFormatException
See Also:
Value.getString()

getType

public int getType()

Specified by:
getType in interface Value
See Also:
Value.getType()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

valueToType

protected Object valueToType(int type,
                             Value value)
                      throws RepositoryException
Throws:
RepositoryException

convertToType

protected Object convertToType(int type,
                               Object value)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.