public class NodePropertyValue extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static Serializable |
EMPTY_COLLECTION_VALUE
used to provide empty collection values in and out
|
static Set<Class<?>> |
IMMUTABLE_CLASSES
Immutable classes in addition to
ValueProtectingMap.DEFAULT_IMMUTABLE_CLASSES
ContentData
ContentDataId
NodeRef
ChildAssociationRef
AssociationRef
QName
VersionNumber
Period |
Constructor and Description |
---|
NodePropertyValue()
default constructor
|
NodePropertyValue(org.alfresco.service.namespace.QName typeQName,
Serializable value)
Construct a new property value.
|
Modifier and Type | Method and Description |
---|---|
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(Object obj) |
Integer |
getActualType() |
String |
getActualTypeString() |
boolean |
getBooleanValue() |
Collection<Serializable> |
getCollection(org.alfresco.service.namespace.QName typeQName)
Gets the value or values as a guaranteed collection.
|
double |
getDoubleValue() |
float |
getFloatValue() |
long |
getLongValue() |
Integer |
getPersistedType() |
Serializable |
getSerializableValue() |
String |
getStringValue() |
Serializable |
getValue(org.alfresco.service.namespace.QName typeQName)
Fetches the value as a desired type.
|
int |
hashCode() |
static boolean |
isDataTypeSupported(org.alfresco.service.namespace.QName typeQName)
If property value of the type
QName is supported |
void |
setActualType(Integer actualType) |
void |
setBooleanValue(boolean value) |
void |
setDoubleValue(double value) |
void |
setFloatValue(float value) |
void |
setLongValue(long value) |
void |
setPersistedType(Integer persistedType) |
void |
setPersistedValue(org.alfresco.repo.domain.node.NodePropertyValue.ValueType persistedType,
Serializable value)
Stores the value in the correct slot based on the type of persistence requested.
|
void |
setSerializableValue(Serializable value) |
void |
setStringValue(String value) |
String |
toString() |
public static final Serializable EMPTY_COLLECTION_VALUE
public static final Set<Class<?>> IMMUTABLE_CLASSES
ValueProtectingMap.DEFAULT_IMMUTABLE_CLASSES
public NodePropertyValue()
public NodePropertyValue(org.alfresco.service.namespace.QName typeQName, 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 givenUnsupportedOperationException
- if the value cannot be converted to the type givenpublic static int convertToTypeOrdinal(org.alfresco.service.namespace.QName typeQName)
typeQName
- the type qualified namepublic static boolean isDataTypeSupported(org.alfresco.service.namespace.QName typeQName)
QName
is supportedtypeQName
- the type qualified namepublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public Integer getActualType()
public String getActualTypeString()
public void setActualType(Integer actualType)
public Integer getPersistedType()
public void setPersistedType(Integer persistedType)
public void setPersistedValue(org.alfresco.repo.domain.node.NodePropertyValue.ValueType persistedType, Serializable value)
persistedType
- the value typevalue
- the value - it may only be null if the persisted type is ValueType#NULL
public Serializable getValue(org.alfresco.service.namespace.QName typeQName)
typeQName
- the type required for the return valueCollection
of values of the required typeorg.alfresco.error.AlfrescoRuntimeException
- if the type given is not recognizedorg.alfresco.service.cmr.repository.datatype.TypeConversionException
- if the conversion to the required type failsThe static qualified names for the types
public Collection<Serializable> getCollection(org.alfresco.service.namespace.QName typeQName)
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 String getStringValue()
public void setStringValue(String value)
public Serializable getSerializableValue()
public void setSerializableValue(Serializable value)
Copyright © 2005–2017 Alfresco Software. All rights reserved.