org.alfresco.repo.domain.propval
Class PropertyValueEntity

java.lang.Object
  extended by org.alfresco.repo.domain.propval.PropertyValueEntity

public class PropertyValueEntity
extends java.lang.Object

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

Nested Class Summary
static class PropertyValueEntity.PersistedType
          Enumeration of persisted types for alf_prop_value.persisted_type.
 
Field Summary
static java.lang.Long LONG_ONE
           
static java.lang.Long LONG_ZERO
           
static java.lang.Short ORDINAL_CONSTRUCTABLE
           
static java.lang.Short ORDINAL_DOUBLE
           
static java.lang.Short ORDINAL_ENUM
           
static java.lang.Short ORDINAL_LONG
           
static java.lang.Short ORDINAL_NULL
           
static java.lang.Short ORDINAL_SERIALIZABLE
           
static java.lang.Short ORDINAL_STRING
           
static org.alfresco.util.Pair PERSISTED_TYPE_NULL
           
static java.util.Map persistedTypesByOrdinal
          An unmodifiable map of persisted type enums keyed by their ordinal number
 
Constructor Summary
PropertyValueEntity()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Long getActualTypeId()
           
 java.lang.Double getDoubleValue()
           
 java.lang.Long getId()
           
 java.lang.Long getLongValue()
           
 java.lang.Short getPersistedType()
           
 PropertyValueEntity.PersistedType getPersistedTypeEnum()
           
static PropertyValueEntity.PersistedType getPersistedTypeEnum(java.io.Serializable value, PropertyTypeConverter converter)
          Helper method to determine how the given value will be stored.
 java.io.Serializable getSerializableValue()
           
 java.lang.String getStringValue()
           
 java.io.Serializable getValue(java.lang.Class actualType, PropertyTypeConverter converter)
          Helper method to get the value based on the persisted type.
 int hashCode()
           
 void setActualTypeId(java.lang.Long actualTypeId)
           
 void setDoubleValue(java.lang.Double doubleValue)
           
 void setId(java.lang.Long id)
           
 void setLongValue(java.lang.Long longValue)
           
 void setPersistedType(java.lang.Short persistedType)
           
 void setSerializableValue(java.io.Serializable serializableValue)
           
 void setStringValue(java.lang.String stringValue)
           
 void setValue(java.io.Serializable value, PropertyTypeConverter converter)
          Shortcut method to set the value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 PERSISTED_TYPE_NULL

persistedTypesByOrdinal

public static final java.util.Map persistedTypesByOrdinal
An unmodifiable map of persisted type enums keyed by their ordinal number

Constructor Detail

PropertyValueEntity

public PropertyValueEntity()
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getValue

public java.io.Serializable getValue(java.lang.Class actualType,
                                     PropertyTypeConverter converter)
Helper method to get the value based on the persisted type.

Parameters:
actualType - the type to convert to
converter - 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 check
converter - 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)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.