Package org.apache.jackrabbit.spi
Interface QValue
-
- All Known Implementing Classes:
AbstractQValue,DefaultQValue
public interface QValueQValueis the SPI representation of ajcr value. It therefore refers toNames andPaths 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 voiddiscard()Frees temporarily allocated resources such as temporary file, buffer, etc.javax.jcr.BinarygetBinary()Returns aBinaryrepresentation of thisQValueobject.booleangetBoolean()Returns abooleanrepresentation of this value.java.util.CalendargetCalendar()Returns aCalendarrepresentation of this value.java.math.BigDecimalgetDecimal()Returns aBigDecimalrepresentation of this value.doublegetDouble()Returns adoublerepresentation of this value.longgetLength()Returns the length of the internal value or -1 if the implementation cannot determine the length at this time.
NOTE: forPropertyType.NAMEandPropertyType.PATHthe length of the internal value must not be used for indicating the length of a property such as retrieved by callingProperty.getLength()andProperty.getLengths().longgetLong()Returns alongrepresentation of this value.NamegetName()Returns aNamerepresentation of this value.PathgetPath()Returns aPathrepresentation of this value.java.io.InputStreamgetStream()Returns anInputStreamrepresentation of thisQValueobject.java.lang.StringgetString()Returns aStringrepresentation of thisQValueobject.intgetType()Returns thePropertyTypeof thisQValueobject.java.net.URIgetURI()Returns anURIrepresentation of this value.
-
-
-
Field Detail
-
EMPTY_ARRAY
static final QValue[] EMPTY_ARRAY
-
-
Method Detail
-
getType
int getType()
Returns thePropertyTypeof thisQValueobject. It may be either of the value property types defined by the JSR 283:PropertyType.STRINGPropertyType.BINARYPropertyType.BOOLEANPropertyType.DATEPropertyType.DECIMALPropertyType.DOUBLEPropertyType.LONGPropertyType.NAMEPropertyType.PATHPropertyType.REFERENCEPropertyType.URIPropertyType.WEAKREFERENCE
- Returns:
- the
PropertyTypeof thisQValueobject.
-
getLength
long getLength() throws javax.jcr.RepositoryExceptionReturns the length of the internal value or -1 if the implementation cannot determine the length at this time.
NOTE: forPropertyType.NAMEandPropertyType.PATHthe 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
QValueobject. - Throws:
javax.jcr.RepositoryException
-
getString
java.lang.String getString() throws javax.jcr.RepositoryExceptionReturns aStringrepresentation of thisQValueobject.- Returns:
- A
Stringrepresentation of thisQValueobject. - Throws:
javax.jcr.RepositoryException
-
getStream
java.io.InputStream getStream() throws javax.jcr.RepositoryExceptionReturns anInputStreamrepresentation of thisQValueobject. This method always returns a new stream.- Returns:
- A stream representation of this value.
- Throws:
javax.jcr.RepositoryException
-
getBinary
javax.jcr.Binary getBinary() throws javax.jcr.RepositoryExceptionReturns aBinaryrepresentation of thisQValueobject.- Returns:
- A
Binaryrepresentation of this value. - Throws:
javax.jcr.RepositoryException
-
getCalendar
java.util.Calendar getCalendar() throws javax.jcr.RepositoryExceptionReturns aCalendarrepresentation of this value.- Returns:
- A
Calendarrepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getDecimal
java.math.BigDecimal getDecimal() throws javax.jcr.RepositoryExceptionReturns aBigDecimalrepresentation of this value.- Returns:
- A
BigDecimalrepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getDouble
double getDouble() throws javax.jcr.RepositoryExceptionReturns adoublerepresentation of this value.- Returns:
- A
doublerepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getLong
long getLong() throws javax.jcr.RepositoryExceptionReturns alongrepresentation of this value.- Returns:
- A
longrepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getBoolean
boolean getBoolean() throws javax.jcr.RepositoryExceptionReturns abooleanrepresentation of this value.- Returns:
- A
booleanrepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getName
Name getName() throws javax.jcr.RepositoryException
Returns aNamerepresentation of this value.- Returns:
- A
Namerepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getPath
Path getPath() throws javax.jcr.RepositoryException
Returns aPathrepresentation of this value.- Returns:
- A
Pathrepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
getURI
java.net.URI getURI() throws javax.jcr.RepositoryExceptionReturns anURIrepresentation of this value.- Returns:
- A
URIrepresentation of this value. - Throws:
javax.jcr.RepositoryException- if an error occurs.
-
discard
void discard()
Frees temporarily allocated resources such as temporary file, buffer, etc.
-
-