|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.domain.node.NodePropertyValue
public class NodePropertyValue
Immutable property value storage class.
Field Summary | |
---|---|
static java.io.Serializable |
EMPTY_COLLECTION_VALUE
used to provide empty collection values in and out |
Constructor Summary | |
---|---|
NodePropertyValue()
default constructor |
|
NodePropertyValue(org.alfresco.service.namespace.QName typeQName,
java.io.Serializable value)
Construct a new property value. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
static int |
convertToTypeOrdinal(org.alfresco.service.namespace.QName typeQName)
Given an actual type qualified name, returns the int ordinal number that represents it in the database. |
boolean |
equals(java.lang.Object obj)
|
java.lang.Integer |
getActualType()
|
java.lang.String |
getActualTypeString()
|
boolean |
getBooleanValue()
|
java.util.Collection |
getCollection(org.alfresco.service.namespace.QName typeQName)
Gets the value or values as a guaranteed collection. |
double |
getDoubleValue()
|
float |
getFloatValue()
|
long |
getLongValue()
|
java.lang.Integer |
getPersistedType()
|
java.io.Serializable |
getSerializableValue()
|
java.lang.String |
getStringValue()
|
java.io.Serializable |
getValue(org.alfresco.service.namespace.QName typeQName)
Fetches the value as a desired type. |
int |
hashCode()
|
void |
setActualType(java.lang.Integer actualType)
|
void |
setBooleanValue(boolean value)
|
void |
setDoubleValue(double value)
|
void |
setFloatValue(float value)
|
void |
setLongValue(long value)
|
void |
setPersistedType(java.lang.Integer persistedType)
|
void |
setPersistedValue(org.alfresco.repo.domain.node.NodePropertyValue.ValueType persistedType,
java.io.Serializable value)
Stores the value in the correct slot based on the type of persistence requested. |
void |
setSerializableValue(java.io.Serializable value)
|
void |
setStringValue(java.lang.String value)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.io.Serializable EMPTY_COLLECTION_VALUE
Constructor Detail |
---|
public NodePropertyValue()
public NodePropertyValue(org.alfresco.service.namespace.QName typeQName, java.io.Serializable value)
typeQName
- the dictionary-defined property type to store the property asvalue
- the value to store. This will be converted into a format compatible
with the type given
java.lang.UnsupportedOperationException
- if the value cannot be converted to the type givenMethod Detail |
---|
public static int convertToTypeOrdinal(org.alfresco.service.namespace.QName typeQName)
typeQName
- the type qualified name
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Integer getActualType()
public java.lang.String getActualTypeString()
public void setActualType(java.lang.Integer actualType)
public java.lang.Integer getPersistedType()
public void setPersistedType(java.lang.Integer persistedType)
public void setPersistedValue(org.alfresco.repo.domain.node.NodePropertyValue.ValueType persistedType, java.io.Serializable value)
persistedType
- the value typevalue
- the value - it may only be null if the persisted type is ValueType#NULL
public java.io.Serializable getValue(org.alfresco.service.namespace.QName typeQName)
typeQName
- the type required for the return value
Collection
of values of the required type
org.alfresco.error.AlfrescoRuntimeException
- if the type given is not recognized
org.alfresco.service.cmr.repository.datatype.TypeConversionException
- if the conversion to the required type failsThe static qualified names for the types
public java.util.Collection getCollection(org.alfresco.service.namespace.QName typeQName)
NodePropertyValue.getValue(QName)
public boolean getBooleanValue()
public void setBooleanValue(boolean value)
public long getLongValue()
public void setLongValue(long value)
public float getFloatValue()
public void setFloatValue(float value)
public double getDoubleValue()
public void setDoubleValue(double value)
public java.lang.String getStringValue()
public void setStringValue(java.lang.String value)
public java.io.Serializable getSerializableValue()
public void setSerializableValue(java.io.Serializable value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |