Package org.apache.jackrabbit.spi
Interface QValue
-
- All Known Implementing Classes:
AbstractQValue
,DefaultQValue
,InternalValue
public interface QValue
QValue
is the SPI representation of ajcr value
. It therefore refers toName
s andPath
s only and is thus isolated from session-specific namespace mappings.
-
-
Field Summary
Fields Modifier and Type Field Description static QValue[]
EMPTY_ARRAY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
discard()
Frees temporarily allocated resources such as temporary file, buffer, etc.Binary
getBinary()
Returns aBinary
representation of thisQValue
object.boolean
getBoolean()
Returns aboolean
representation of this value.Calendar
getCalendar()
Returns aCalendar
representation of this value.BigDecimal
getDecimal()
Returns aBigDecimal
representation of this value.double
getDouble()
Returns adouble
representation of this value.long
getLength()
Returns the length of the internal value or -1 if the implementation cannot determine the length at this time.
NOTE: forPropertyType.NAME
andPropertyType.PATH
the length of the internal value must not be used for indicating the length of a property such as retrieved by callingProperty.getLength()
andProperty.getLengths()
.long
getLong()
Returns along
representation of this value.Name
getName()
Returns aName
representation of this value.Path
getPath()
Returns aPath
representation of this value.InputStream
getStream()
Returns anInputStream
representation of thisQValue
object.String
getString()
Returns aString
representation of thisQValue
object.int
getType()
Returns thePropertyType
of thisQValue
object.URI
getURI()
Returns anURI
representation of this value.
-
-
-
Field Detail
-
EMPTY_ARRAY
static final QValue[] EMPTY_ARRAY
-
-
Method Detail
-
getType
int getType()
Returns thePropertyType
of thisQValue
object. It may be either of the value property types defined by the JSR 283:- Returns:
- the
PropertyType
of thisQValue
object.
-
getLength
long getLength() throws RepositoryException
Returns the length of the internal value or -1 if the implementation cannot determine the length at this time.
NOTE: forPropertyType.NAME
andPropertyType.PATH
the length of the internal value must not be used for indicating the length of a property such as retrieved by callingProperty.getLength()
andProperty.getLengths()
.- Returns:
- length of this
QValue
object. - Throws:
RepositoryException
-
getString
String getString() throws RepositoryException
Returns aString
representation of thisQValue
object.- Returns:
- A
String
representation of thisQValue
object. - Throws:
RepositoryException
-
getStream
InputStream getStream() throws RepositoryException
Returns anInputStream
representation of thisQValue
object. This method always returns a new stream.- Returns:
- A stream representation of this value.
- Throws:
RepositoryException
-
getBinary
Binary getBinary() throws RepositoryException
Returns aBinary
representation of thisQValue
object.- Returns:
- A
Binary
representation of this value. - Throws:
RepositoryException
-
getCalendar
Calendar getCalendar() throws RepositoryException
Returns aCalendar
representation of this value.- Returns:
- A
Calendar
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getDecimal
BigDecimal getDecimal() throws RepositoryException
Returns aBigDecimal
representation of this value.- Returns:
- A
BigDecimal
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getDouble
double getDouble() throws RepositoryException
Returns adouble
representation of this value.- Returns:
- A
double
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getLong
long getLong() throws RepositoryException
Returns along
representation of this value.- Returns:
- A
long
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getBoolean
boolean getBoolean() throws RepositoryException
Returns aboolean
representation of this value.- Returns:
- A
boolean
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getName
Name getName() throws RepositoryException
Returns aName
representation of this value.- Returns:
- A
Name
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getPath
Path getPath() throws RepositoryException
Returns aPath
representation of this value.- Returns:
- A
Path
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
getURI
URI getURI() throws RepositoryException
Returns anURI
representation of this value.- Returns:
- A
URI
representation of this value. - Throws:
RepositoryException
- if an error occurs.
-
discard
void discard()
Frees temporarily allocated resources such as temporary file, buffer, etc.
-
-