public abstract class AbstractQValue extends Object implements QValue, Serializable
AbstractQValue...| Modifier and Type | Field and Description |
|---|---|
protected int |
type |
protected Object |
val |
EMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractQValue(BigDecimal value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Boolean value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Calendar value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Double value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Long value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Name value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Object value,
int type)
Create a new
AbstractQValue. |
protected |
AbstractQValue(Path value)
Create a new
AbstractQValue. |
protected |
AbstractQValue(String value,
int type)
Create a new
AbstractQValue. |
protected |
AbstractQValue(URI value)
Create a new
AbstractQValue. |
| Modifier and Type | Method and Description |
|---|---|
void |
discard()
Frees temporarily allocated resources such as temporary file, buffer, etc.
|
boolean |
equals(Object obj)
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. |
boolean |
getBoolean()
Returns a
boolean representation of this value. |
Calendar |
getCalendar()
Returns a
Calendar representation of this value. |
BigDecimal |
getDecimal()
Returns a
BigDecimal representation of this value. |
double |
getDouble()
Returns a
double 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: 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(). |
long |
getLong()
Returns a
long representation of this value. |
Name |
getName()
Returns a
Name representation of this value. |
Path |
getPath()
Returns a
Path representation of this value. |
String |
getString()
Returns a
String representation of this QValue
object. |
int |
getType()
Returns the
PropertyType of this QValue object. |
URI |
getURI()
Returns an
URI representation of this value. |
int |
hashCode()
Default calculation of the hashCode.
|
String |
toString()
Returns the string representation of this internal value.
|
protected final Object val
protected final int type
protected AbstractQValue(Object value, int type)
AbstractQValue.value - The value.type - The property type.IllegalArgumentException - if the passed value
is null.protected AbstractQValue(String value, int type)
AbstractQValue.value - type - IllegalArgumentException - if the passed value
is null or if the type is neither STRING nor
REFERENCE/WEAKREFERENCE.protected AbstractQValue(Long value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(Double value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(Boolean value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(Calendar value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(Name value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(Path value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(BigDecimal value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.protected AbstractQValue(URI value)
AbstractQValue.value - IllegalArgumentException - if the passed value
is null.public int getType()
QValuePropertyType of this QValue object.
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.WEAKREFERENCEgetType in interface QValuePropertyType of this QValue object.QValue.getType()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 QValueQValue object.javax.jcr.RepositoryExceptionQValue.getLength()public Name getName() throws javax.jcr.RepositoryException
QValueName representation of this value.getName in interface QValueName representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getName()public Calendar getCalendar() throws javax.jcr.RepositoryException
QValueCalendar representation of this value.getCalendar in interface QValueCalendar representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getCalendar()public BigDecimal getDecimal() throws javax.jcr.RepositoryException
QValueBigDecimal representation of this value.getDecimal in interface QValueBigDecimal representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getDecimal()public URI getURI() throws javax.jcr.RepositoryException
QValueURI representation of this value.getURI in interface QValueURI representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getURI()public double getDouble()
throws javax.jcr.RepositoryException
QValuedouble representation of this value.getDouble in interface QValuedouble representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getDouble()public long getLong()
throws javax.jcr.RepositoryException
QValuelong representation of this value.getLong in interface QValuelong representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getLong()public boolean getBoolean()
throws javax.jcr.RepositoryException
QValueboolean representation of this value.getBoolean in interface QValueboolean representation of this value.javax.jcr.RepositoryExceptionQValue.getBoolean()public Path getPath() throws javax.jcr.RepositoryException
QValuePath representation of this value.getPath in interface QValuePath representation of this value.javax.jcr.RepositoryException - if an error occurs.QValue.getPath()public String getString() throws javax.jcr.RepositoryException
QValueString representation of this QValue
object.getString in interface QValueString representation of this QValue
object.javax.jcr.RepositoryExceptionQValue.getPath()public javax.jcr.Binary getBinary()
throws javax.jcr.RepositoryException
QValue.getStream() and skipping on the given stream as its underlying
mechanism to provide random access defined on Binary.getBinary in interface QValueBinary representation of this value.javax.jcr.RepositoryExceptionQValue.getBinary()public void discard()
QValuediscard in interface QValueQValue.discard()public String toString()
public boolean equals(Object obj)
equals in class Objectobj - Object.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.