org.alfresco.jcr.item
Class ValueImpl

java.lang.Object
  extended by org.alfresco.jcr.item.ValueImpl
All Implemented Interfaces:
javax.jcr.Value

public class ValueImpl
extends java.lang.Object
implements javax.jcr.Value

Alfresco implementation of JCR Value


Constructor Summary
ValueImpl(SessionImpl session, int datatype, java.lang.Object value)
          Constuct
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean getBoolean()
           
 java.util.Calendar getDate()
           
 double getDouble()
           
 long getLong()
           
 javax.jcr.Value getProxy()
          Create a proxied JCR Value
 java.io.InputStream getStream()
           
 java.lang.String getString()
           
 int getType()
           
static java.lang.Object getValue(JCRTypeConverter typeConverter, int requiredType, javax.jcr.Value value)
          Get typed value
static java.lang.Object getValue(javax.jcr.Value value)
          Get value
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueImpl

public ValueImpl(SessionImpl session,
                 int datatype,
                 java.lang.Object value)
Constuct

Parameters:
value - value to wrap
Method Detail

getProxy

public javax.jcr.Value getProxy()
Create a proxied JCR Value

Returns:
the proxied value

getString

public java.lang.String getString()
                           throws javax.jcr.ValueFormatException,
                                  java.lang.IllegalStateException,
                                  javax.jcr.RepositoryException
Specified by:
getString in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

getStream

public java.io.InputStream getStream()
                              throws java.lang.IllegalStateException,
                                     javax.jcr.RepositoryException
Specified by:
getStream in interface javax.jcr.Value
Throws:
java.lang.IllegalStateException
javax.jcr.RepositoryException

getLong

public long getLong()
             throws javax.jcr.ValueFormatException,
                    java.lang.IllegalStateException,
                    javax.jcr.RepositoryException
Specified by:
getLong in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

getDouble

public double getDouble()
                 throws javax.jcr.ValueFormatException,
                        java.lang.IllegalStateException,
                        javax.jcr.RepositoryException
Specified by:
getDouble in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

getDate

public java.util.Calendar getDate()
                           throws javax.jcr.ValueFormatException,
                                  java.lang.IllegalStateException,
                                  javax.jcr.RepositoryException
Specified by:
getDate in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

getBoolean

public boolean getBoolean()
                   throws javax.jcr.ValueFormatException,
                          java.lang.IllegalStateException,
                          javax.jcr.RepositoryException
Specified by:
getBoolean in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

getType

public int getType()
Specified by:
getType in interface javax.jcr.Value

getValue

public static java.lang.Object getValue(javax.jcr.Value value)
                                 throws javax.jcr.RepositoryException
Get value

Parameters:
value - the value wrapper to extract from
Returns:
the value
Throws:
javax.jcr.RepositoryException

getValue

public static java.lang.Object getValue(JCRTypeConverter typeConverter,
                                        int requiredType,
                                        javax.jcr.Value value)
                                 throws javax.jcr.RepositoryException
Get typed value

Parameters:
value - the value to extract from
Returns:
the wrapped object
Throws:
javax.jcr.RepositoryException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.