com.sas.util.transforms
Class ObjectToPropertyValueTransform

com.sas.util.transforms.ObjectToPropertyValueTransform
All Implemented Interfaces:
com.sas.util.transforms.TransformInterface, java.io.Serializable

public class ObjectToPropertyValueTransform
implements com.sas.util.transforms.TransformInterface

ObjectToPropertyValueTransform transforms an Object into the value of one of its properties. The property to use is specified during the construction of the transform.

See Also:
Serialized Form

Field Summary
protected  java.lang.String propertyName
          The name of the property to get the value of.
 
Constructor Summary
ObjectToPropertyValueTransform(java.lang.String propertyName)
          Constructor which allows setting of the name of the property to use the value of.
 
Method Summary
 java.lang.String getPropertyName()
          Returns the name of the property to get the value of.
 void setPropertyName(java.lang.String propertyName)
          Sets the name of the property to get the value of.
 java.lang.Object transform(java.lang.Object value)
          Returns the value of the property from the object passed in.
 

Field Detail

propertyName

protected java.lang.String propertyName
The name of the property to get the value of.

Constructor Detail

ObjectToPropertyValueTransform

public ObjectToPropertyValueTransform(java.lang.String propertyName)
Constructor which allows setting of the name of the property to use the value of.

Parameters:
The - name of the property.
Method Detail

getPropertyName

public java.lang.String getPropertyName()
Returns the name of the property to get the value of.

Returns:
The name of the property.

setPropertyName

public void setPropertyName(java.lang.String propertyName)
Sets the name of the property to get the value of.

Parameters:
propertyName - The name of the property.

transform

public java.lang.Object transform(java.lang.Object value)
Returns the value of the property from the object passed in. If the object passed in is null, null will be returned. If there is an exception getting the value of the property, null will be returned.

Specified by:
transform in interface com.sas.util.transforms.TransformInterface
Parameters:
value -
Returns:
The value of the property or null.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.