public class InternalValue extends AbstractQValue
InternalValue represents the internal format of a property value.
 The following table specifies the internal format for every property type:
| PropertyType | Internal Format | 
| STRING | String | 
| LONG | Long | 
| DOUBLE | Double | 
| DATE | Calendar | 
| BOOLEAN | Boolean | 
| NAME | Name | 
| PATH | Path | 
| URI | URI | 
| DECIMAL | BigDecimal | 
| BINARY | BLOBFileValue | 
| REFERENCE | NodeId | 
| Modifier and Type | Field and Description | 
|---|---|
static InternalValue[] | 
EMPTY_ARRAY  | 
type, val| Modifier and Type | Method and Description | 
|---|---|
static InternalValue | 
create(BigDecimal value)  | 
static InternalValue | 
create(boolean value)  | 
static InternalValue | 
create(byte[] value)  | 
static InternalValue | 
create(Calendar value)  | 
static InternalValue | 
create(DataStore store,
      String id)
Create a binary object with the given identifier. 
 | 
static InternalValue | 
create(double value)  | 
static InternalValue | 
create(FileSystemResource value)  | 
static InternalValue | 
create(InputStream value)  | 
static InternalValue | 
create(InputStream value,
      DataStore store)
Create an internal value that is stored in the data store (if enabled). 
 | 
static InternalValue | 
create(long value)  | 
static InternalValue | 
create(Name value)  | 
static InternalValue[] | 
create(Name[] values)  | 
static InternalValue | 
create(NodeId value)  | 
static InternalValue | 
create(NodeId value,
      boolean weak)  | 
static InternalValue | 
create(Path value)  | 
static InternalValue | 
create(QValue value)  | 
static InternalValue[] | 
create(QValue[] values)  | 
static InternalValue | 
create(String value)  | 
static InternalValue | 
create(URI value)  | 
static InternalValue | 
create(javax.jcr.Value value,
      NamePathResolver resolver)
Create a new internal value from the given JCR value. 
 | 
static InternalValue | 
create(javax.jcr.Value value,
      NamePathResolver resolver,
      DataStore store)
Create a new internal value from the given JCR value. 
 | 
InternalValue | 
createCopy()
Create a copy of this object. 
 | 
static InternalValue | 
createDate(String value)
https://issues.apache.org/jira/browse/JCR-3083 
 | 
static InternalValue | 
createTemporary(InputStream value)
Create an internal value that is backed by a temporary file. 
 | 
void | 
deleteBinaryResource()
Delete persistent binary objects. 
 | 
void | 
discard()
Frees temporarily allocated resources such as temporary file, buffer, etc. 
 | 
boolean | 
equals(Object object)
Default implementation of the equals method. 
 | 
javax.jcr.Binary | 
getBinary()
This implementation creates a binary instance that uses
  
QValue.getStream() and skipping on the given stream as its underlying
 mechanism to provide random access defined on Binary. | 
Calendar | 
getDate()  | 
long | 
getLength()
Returns the length of the internal value or -1 if the implementation
 cannot determine the length at this time. 
NOTE: for PropertyType.NAME and PropertyType.PATH the
 length of the internal value must not be used for indicating the length
 of a property such as retrieved by calling Property.getLength()
 and Property.getLengths(). | 
NodeId | 
getNodeId()  | 
InputStream | 
getStream()
Returns an  
InputStream representation of this QValue
 object. | 
boolean | 
isInDataStore()  | 
static InternalValue | 
valueOf(String s,
       int type)
Parses the given string as an  
InternalValue of the
 specified type. | 
getBoolean, getCalendar, getDecimal, getDouble, getLong, getName, getPath, getString, getType, getURI, hashCode, toStringpublic static final InternalValue[] EMPTY_ARRAY
public static InternalValue create(javax.jcr.Value value, NamePathResolver resolver) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
value - the JCR valueresolver - javax.jcr.RepositoryExceptionjavax.jcr.ValueFormatExceptionpublic static InternalValue create(javax.jcr.Value value, NamePathResolver resolver, DataStore store) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
value - the JCR valueresolver - store - the data storejavax.jcr.RepositoryExceptionjavax.jcr.ValueFormatExceptionpublic static InternalValue create(QValue value) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static InternalValue[] create(QValue[] values) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static InternalValue create(String value)
value - public static InternalValue create(long value)
value - public static InternalValue create(double value)
value - public static InternalValue create(Calendar value)
value - public static InternalValue createDate(String value)
value - public static InternalValue create(BigDecimal value)
value - public static InternalValue create(URI value)
value - public static InternalValue create(boolean value)
value - public static InternalValue create(byte[] value)
value - public static InternalValue createTemporary(InputStream value) throws javax.jcr.RepositoryException
value - the streamjavax.jcr.RepositoryExceptionpublic static InternalValue create(InputStream value, DataStore store) throws javax.jcr.RepositoryException
value - the input streamstore - javax.jcr.RepositoryExceptionpublic static InternalValue create(InputStream value) throws javax.jcr.RepositoryException
value - javax.jcr.RepositoryExceptionpublic static InternalValue create(FileSystemResource value) throws IOException
value - IOExceptionpublic static InternalValue create(DataStore store, String id)
store - the data storeid - the identifierpublic static InternalValue create(Name value)
value - public static InternalValue[] create(Name[] values)
values - public static InternalValue create(Path value)
value - public static InternalValue create(NodeId value)
value - public static InternalValue create(NodeId value, boolean weak)
value - weak - public NodeId getNodeId()
public Calendar getDate() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic InternalValue createCopy() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static InternalValue valueOf(String s, int type)
InternalValue of the
 specified type. The string must be in the format returned by the
 InternalValue.toString() method.s - a String containing the InternalValue
          representation to be parsed.type - InternalValue represented by the argumentsIllegalArgumentException - if the specified string can not be parsed
                                  as an InternalValue of the
                                  specified type.AbstractQValue.toString()public boolean isInDataStore()
public long getLength()
               throws javax.jcr.RepositoryException
QValuePropertyType.NAME and PropertyType.PATH the
 length of the internal value must not be used for indicating the length
 of a property such as retrieved by calling Property.getLength()
 and Property.getLengths().getLength in interface QValuegetLength in class AbstractQValueQValue object.javax.jcr.RepositoryExceptionQValue.getLength()public InputStream getStream() throws javax.jcr.RepositoryException
QValueInputStream representation of this QValue
 object. This method always returns a new stream.javax.jcr.RepositoryExceptionQValue.getStream()public javax.jcr.Binary getBinary()
                           throws javax.jcr.RepositoryException
AbstractQValueQValue.getStream() and skipping on the given stream as its underlying
 mechanism to provide random access defined on Binary.getBinary in interface QValuegetBinary in class AbstractQValueBinary representation of this value.javax.jcr.RepositoryExceptionQValue.getBinary()public void discard()
QValuediscard in interface QValuediscard in class AbstractQValueQValue.discard()public void deleteBinaryResource()
public boolean equals(Object object)
AbstractQValueequals in class AbstractQValueObject.equals(Object)Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.