org.apache.chemistry.opencmis.client.runtime
Class PropertyImpl<T>

java.lang.Object
  extended by org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractExtensionData
      extended by org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractPropertyData<T>
          extended by org.apache.chemistry.opencmis.client.runtime.PropertyImpl<T>
All Implemented Interfaces:
java.io.Serializable, Property<T>, ExtensionsData, PropertyData<T>

public class PropertyImpl<T>
extends AbstractPropertyData<T>
implements Property<T>, java.io.Serializable

Property Implementation.

See Also:
Serialized Form

Constructor Summary
PropertyImpl(Property<T> property)
          Copy constructor.
PropertyImpl(PropertyDefinition<T> pd, java.util.List<T> values)
          Constructs a property from a list of values.
 
Method Summary
 PropertyDefinition<T> getDefinition()
          Returns the property definition.
 PropertyType getType()
          Returns the property data type.
<U> U
getValue()
          Returns the property value (single or multiple).
 java.lang.String getValueAsString()
          Returns a human readable representation of the property value.
 java.lang.String getValuesAsString()
          Returns a human readable representation of the property values.
protected  void initialize(PropertyDefinition<?> pd)
           
 boolean isMultiValued()
          Returns if the property is a multi-value property.
 
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractPropertyData
getDisplayName, getFirstValue, getId, getLocalName, getQueryName, getValues, setDisplayName, setId, setLocalName, setQueryName, setValue, setValues, toString
 
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractExtensionData
getExtensions, setExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.data.PropertyData
getDisplayName, getFirstValue, getId, getLocalName, getQueryName, getValues
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.data.ExtensionsData
getExtensions, setExtensions
 

Constructor Detail

PropertyImpl

public PropertyImpl(PropertyDefinition<T> pd,
                    java.util.List<T> values)
Constructs a property from a list of values.


PropertyImpl

public PropertyImpl(Property<T> property)
Copy constructor.

Method Detail

initialize

protected void initialize(PropertyDefinition<?> pd)

getDefinition

public PropertyDefinition<T> getDefinition()
Description copied from interface: Property
Returns the property definition.

Specified by:
getDefinition in interface Property<T>

getType

public PropertyType getType()
Description copied from interface: Property
Returns the property data type.

Specified by:
getType in interface Property<T>

getValue

public <U> U getValue()
Description copied from interface: Property
Returns the property value (single or multiple).

Specified by:
getValue in interface Property<T>

getValueAsString

public java.lang.String getValueAsString()
Description copied from interface: Property
Returns a human readable representation of the property value. If the property is multi-value property, only the first value will be returned.

Specified by:
getValueAsString in interface Property<T>

getValuesAsString

public java.lang.String getValuesAsString()
Description copied from interface: Property
Returns a human readable representation of the property values.

Specified by:
getValuesAsString in interface Property<T>

isMultiValued

public boolean isMultiValued()
Description copied from interface: Property
Returns if the property is a multi-value property.

Specified by:
isMultiValued in interface Property<T>


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.