Package org.alfresco.repo.domain.propval
Class PropertyValueEntity
- java.lang.Object
-
- org.alfresco.repo.domain.propval.PropertyValueEntity
-
public class PropertyValueEntity extends Object
Entity bean for alf_prop_value table.Values here are either simple values that can be stored in a
longor will be references to data in other tables.- Since:
- 3.2
- Author:
- Derek Hulley
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPropertyValueEntity.PersistedTypeEnumeration of persisted types for alf_prop_value.persisted_type.
-
Field Summary
Fields Modifier and Type Field Description static LongLONG_ONEstatic LongLONG_ZEROstatic ShortORDINAL_CONSTRUCTABLEstatic ShortORDINAL_DOUBLEstatic ShortORDINAL_ENUMstatic ShortORDINAL_LONGstatic ShortORDINAL_NULLstatic ShortORDINAL_SERIALIZABLEstatic ShortORDINAL_STRINGstatic org.alfresco.util.Pair<Short,Serializable>PERSISTED_TYPE_NULLstatic Map<Short,PropertyValueEntity.PersistedType>persistedTypesByOrdinalAn unmodifiable map of persisted type enums keyed by their ordinal number
-
Constructor Summary
Constructors Constructor Description PropertyValueEntity()
-
Method Summary
-
-
-
Field Detail
-
LONG_ZERO
public static final Long LONG_ZERO
-
LONG_ONE
public static final Long LONG_ONE
-
ORDINAL_NULL
public static final Short ORDINAL_NULL
-
ORDINAL_LONG
public static final Short ORDINAL_LONG
-
ORDINAL_DOUBLE
public static final Short ORDINAL_DOUBLE
-
ORDINAL_STRING
public static final Short ORDINAL_STRING
-
ORDINAL_SERIALIZABLE
public static final Short ORDINAL_SERIALIZABLE
-
ORDINAL_CONSTRUCTABLE
public static final Short ORDINAL_CONSTRUCTABLE
-
ORDINAL_ENUM
public static final Short ORDINAL_ENUM
-
PERSISTED_TYPE_NULL
public static final org.alfresco.util.Pair<Short,Serializable> PERSISTED_TYPE_NULL
-
persistedTypesByOrdinal
public static final Map<Short,PropertyValueEntity.PersistedType> persistedTypesByOrdinal
An unmodifiable map of persisted type enums keyed by their ordinal number
-
-
Method Detail
-
getValue
public Serializable getValue(Class<Serializable> actualType, PropertyTypeConverter converter)
Helper method to get the value based on the persisted type.- Parameters:
actualType- the type to convert toconverter- the data converter to use- Returns:
- Returns the converted value
-
setValue
public void setValue(Serializable value, PropertyTypeConverter converter)
Shortcut method to set the value. It will be converted as required and the necessary fields will be populated.- Parameters:
value- the value to persist (may be null)converter- the converter that will perform and type conversion
-
getPersistedTypeEnum
public static PropertyValueEntity.PersistedType getPersistedTypeEnum(Serializable value, PropertyTypeConverter converter)
Helper method to determine how the given value will be stored.- Parameters:
value- the value to checkconverter- the type converter- Returns:
- Returns the persisted type
- See Also:
PropertyTypeConverter.getPersistentType(Serializable)
-
getPersistedTypeEnum
public PropertyValueEntity.PersistedType getPersistedTypeEnum()
-
getId
public Long getId()
-
setId
public void setId(Long id)
-
getActualTypeId
public Long getActualTypeId()
-
setActualTypeId
public void setActualTypeId(Long actualTypeId)
-
getPersistedType
public Short getPersistedType()
-
setPersistedType
public void setPersistedType(Short persistedType)
-
getLongValue
public Long getLongValue()
-
setLongValue
public void setLongValue(Long longValue)
-
getStringValue
public String getStringValue()
-
setStringValue
public void setStringValue(String stringValue)
-
getDoubleValue
public Double getDoubleValue()
-
setDoubleValue
public void setDoubleValue(Double doubleValue)
-
getSerializableValue
public Serializable getSerializableValue()
-
setSerializableValue
public void setSerializableValue(Serializable serializableValue)
-
-