public class PropertyValue
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
As of 2.2.1, this class is only used by the AVM persistence layers.
| Constructor and Description |
|---|
PropertyValue()
default constructor
|
PropertyValue(org.alfresco.service.namespace.QName typeQName,
java.io.Serializable value)
Construct a new property value.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
boolean |
isMultiValued() |
void |
setActualType(java.lang.Integer actualType) |
void |
setBooleanValue(boolean value) |
void |
setDoubleValue(double value) |
void |
setFloatValue(float value) |
void |
setLongValue(long value) |
void |
setMultiValued(boolean isMultiValued) |
void |
setPersistedType(java.lang.Integer persistedType) |
void |
setPersistedValue(org.alfresco.repo.domain.PropertyValue.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() |
public PropertyValue()
public PropertyValue(org.alfresco.service.namespace.QName typeQName,
java.io.Serializable value)
typeQName - the dictionary-defined property type to store the property as.
May be null in which case the type will be determined from the value parameter.value - the value to store. This will be converted into a format compatible
with the type givenjava.lang.UnsupportedOperationException - if the value cannot be converted to the
type givenpublic static int convertToTypeOrdinal(org.alfresco.service.namespace.QName typeQName)
typeQName - the type qualified namepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Integer getActualType()
public java.lang.String getActualTypeString()
public void setActualType(java.lang.Integer actualType)
public boolean isMultiValued()
public void setMultiValued(boolean isMultiValued)
public java.lang.Integer getPersistedType()
public void setPersistedType(java.lang.Integer persistedType)
public void setPersistedValue(org.alfresco.repo.domain.PropertyValue.ValueType persistedType,
java.io.Serializable value)
persistedType - the value typevalue - the value - it may only be null if the persisted type is ValueType#NULLpublic java.io.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 typespublic java.util.Collection getCollection(org.alfresco.service.namespace.QName typeQName)
PropertyValue.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)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.