Package org.alfresco.repo.domain.propval
Class PropertyValueEntity
java.lang.Object
org.alfresco.repo.domain.propval.PropertyValueEntity
Entity bean for alf_prop_value table.
Values here are either simple values that can be stored in a long
or will be references to data in other tables.
- Since:
- 3.2
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of persisted types for alf_prop_value.persisted_type. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Longstatic final Longstatic final Shortstatic final Shortstatic final Shortstatic final Shortstatic final Shortstatic final Shortstatic final Shortstatic final Pair<Short,Serializable> static final Map<Short,PropertyValueEntity.PersistedType> An unmodifiable map of persisted type enums keyed by their ordinal number -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()getPersistedTypeEnum(Serializable value, PropertyTypeConverter converter) Helper method to determine how the given value will be stored.getValue(Class<Serializable> actualType, PropertyTypeConverter converter) Helper method to get the value based on the persisted type.inthashCode()voidsetActualTypeId(Long actualTypeId) voidsetDoubleValue(Double doubleValue) voidvoidsetLongValue(Long longValue) voidsetPersistedType(Short persistedType) voidsetSerializableValue(Serializable serializableValue) voidsetStringValue(String stringValue) voidsetValue(Serializable value, PropertyTypeConverter converter) Shortcut method to set the value.toString()
-
Field Details
-
LONG_ZERO
-
LONG_ONE
-
ORDINAL_NULL
-
ORDINAL_LONG
-
ORDINAL_DOUBLE
-
ORDINAL_STRING
-
ORDINAL_SERIALIZABLE
-
ORDINAL_CONSTRUCTABLE
-
ORDINAL_ENUM
-
PERSISTED_TYPE_NULL
-
persistedTypesByOrdinal
An unmodifiable map of persisted type enums keyed by their ordinal number
-
-
Constructor Details
-
PropertyValueEntity
public PropertyValueEntity()
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
getValue
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
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:
-
getPersistedTypeEnum
-
getId
-
setId
-
getActualTypeId
-
setActualTypeId
-
getPersistedType
-
setPersistedType
-
getLongValue
-
setLongValue
-
getStringValue
-
setStringValue
-
getDoubleValue
-
setDoubleValue
-
getSerializableValue
-
setSerializableValue
-