Package org.alfresco.repo.domain.propval
Class PropertyValueEntity
- java.lang.Object
-
- org.alfresco.repo.domain.propval.PropertyValueEntity
-
public class PropertyValueEntity extends java.lang.ObjectEntity 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 java.lang.LongLONG_ONEstatic java.lang.LongLONG_ZEROstatic java.lang.ShortORDINAL_CONSTRUCTABLEstatic java.lang.ShortORDINAL_DOUBLEstatic java.lang.ShortORDINAL_ENUMstatic java.lang.ShortORDINAL_LONGstatic java.lang.ShortORDINAL_NULLstatic java.lang.ShortORDINAL_SERIALIZABLEstatic java.lang.ShortORDINAL_STRINGstatic org.alfresco.util.Pair<java.lang.Short,java.io.Serializable>PERSISTED_TYPE_NULLstatic java.util.Map<java.lang.Short,PropertyValueEntity.PersistedType>persistedTypesByOrdinalAn unmodifiable map of persisted type enums keyed by their ordinal number
-
Constructor Summary
Constructors Constructor Description PropertyValueEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.LonggetActualTypeId()java.lang.DoublegetDoubleValue()java.lang.LonggetId()java.lang.LonggetLongValue()java.lang.ShortgetPersistedType()PropertyValueEntity.PersistedTypegetPersistedTypeEnum()static PropertyValueEntity.PersistedTypegetPersistedTypeEnum(java.io.Serializable value, PropertyTypeConverter converter)Helper method to determine how the given value will be stored.java.io.SerializablegetSerializableValue()java.lang.StringgetStringValue()java.io.SerializablegetValue(java.lang.Class<java.io.Serializable> actualType, PropertyTypeConverter converter)Helper method to get the value based on the persisted type.inthashCode()voidsetActualTypeId(java.lang.Long actualTypeId)voidsetDoubleValue(java.lang.Double doubleValue)voidsetId(java.lang.Long id)voidsetLongValue(java.lang.Long longValue)voidsetPersistedType(java.lang.Short persistedType)voidsetSerializableValue(java.io.Serializable serializableValue)voidsetStringValue(java.lang.String stringValue)voidsetValue(java.io.Serializable value, PropertyTypeConverter converter)Shortcut method to set the value.java.lang.StringtoString()
-
-
-
Field Detail
-
LONG_ZERO
public static final java.lang.Long LONG_ZERO
-
LONG_ONE
public static final java.lang.Long LONG_ONE
-
ORDINAL_NULL
public static final java.lang.Short ORDINAL_NULL
-
ORDINAL_LONG
public static final java.lang.Short ORDINAL_LONG
-
ORDINAL_DOUBLE
public static final java.lang.Short ORDINAL_DOUBLE
-
ORDINAL_STRING
public static final java.lang.Short ORDINAL_STRING
-
ORDINAL_SERIALIZABLE
public static final java.lang.Short ORDINAL_SERIALIZABLE
-
ORDINAL_CONSTRUCTABLE
public static final java.lang.Short ORDINAL_CONSTRUCTABLE
-
ORDINAL_ENUM
public static final java.lang.Short ORDINAL_ENUM
-
PERSISTED_TYPE_NULL
public static final org.alfresco.util.Pair<java.lang.Short,java.io.Serializable> PERSISTED_TYPE_NULL
-
persistedTypesByOrdinal
public static final java.util.Map<java.lang.Short,PropertyValueEntity.PersistedType> persistedTypesByOrdinal
An unmodifiable map of persisted type enums keyed by their ordinal number
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getValue
public java.io.Serializable getValue(java.lang.Class<java.io.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(java.io.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(java.io.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 java.lang.Long getId()
-
setId
public void setId(java.lang.Long id)
-
getActualTypeId
public java.lang.Long getActualTypeId()
-
setActualTypeId
public void setActualTypeId(java.lang.Long actualTypeId)
-
getPersistedType
public java.lang.Short getPersistedType()
-
setPersistedType
public void setPersistedType(java.lang.Short persistedType)
-
getLongValue
public java.lang.Long getLongValue()
-
setLongValue
public void setLongValue(java.lang.Long longValue)
-
getStringValue
public java.lang.String getStringValue()
-
setStringValue
public void setStringValue(java.lang.String stringValue)
-
getDoubleValue
public java.lang.Double getDoubleValue()
-
setDoubleValue
public void setDoubleValue(java.lang.Double doubleValue)
-
getSerializableValue
public java.io.Serializable getSerializableValue()
-
setSerializableValue
public void setSerializableValue(java.io.Serializable serializableValue)
-
-