com.sas.servlet.tbeans.models
Class MapToItemTransform

com.sas.servlet.tbeans.models.MapToItemTransform
All Implemented Interfaces:
com.sas.util.transforms.TransformInputOutputInterface, com.sas.util.transforms.TransformInterface, java.io.Serializable

public class MapToItemTransform
implements com.sas.util.transforms.TransformInputOutputInterface

Transforms a Map into an Item by subsituting the Map keys and values with their corresponding Item values.

See Also:
Serialized Form

Constructor Summary
MapToItemTransform()
          Construct a new MapToItemTransform
 
Method Summary
 java.lang.Class getInputClass()
          Gets the input class to be transformed.
 java.lang.Class getOutputClass()
          Gets the output class from the transform of the input class.
 java.lang.String getTextColumnName()
          Gets the key name for the text column in the Map to be transformed.
 java.lang.String getValueColumnName()
          Gets the key name for the value column in the Map to be transformed.
 void setTextColumnName(java.lang.String textName)
          Sets the key name for the text column in the Map to be transformed.
 void setValueColumnName(java.lang.String valueName)
          Sets the key name for the value column in the Map to be transformed.
 java.lang.Object transform(java.lang.Object input)
          Transforms the input map into an Item
 

Constructor Detail

MapToItemTransform

public MapToItemTransform()
Construct a new MapToItemTransform

Method Detail

transform

public java.lang.Object transform(java.lang.Object input)
Transforms the input map into an Item

Specified by:
transform in interface com.sas.util.transforms.TransformInterface
Parameters:
input - The map to transform into an Item
Returns:
Object The transformed object as an Item

setTextColumnName

public void setTextColumnName(java.lang.String textName)
Sets the key name for the text column in the Map to be transformed. The corresponding value for this key in the Map will be used to set the text of the Item.

Parameters:
textName - The name of the key in the Map for the text column.

getTextColumnName

public java.lang.String getTextColumnName()
Gets the key name for the text column in the Map to be transformed.

Returns:
textColumnName The name of the key in the Map for the text column.

setValueColumnName

public void setValueColumnName(java.lang.String valueName)
Sets the key name for the value column in the Map to be transformed. The corresponding value for this key in the Map will be used to set the value of the Item.

Parameters:
valueName - The name of the key in the Map for the value column.

getValueColumnName

public java.lang.String getValueColumnName()
Gets the key name for the value column in the Map to be transformed.

Returns:
valueColumnName The name of the key in the Map for the value column.

getInputClass

public java.lang.Class getInputClass()
Gets the input class to be transformed.

Specified by:
getInputClass in interface com.sas.util.transforms.TransformInputOutputInterface
Returns:
Map The input class to be transformed.

getOutputClass

public java.lang.Class getOutputClass()
Gets the output class from the transform of the input class.

Specified by:
getOutputClass in interface com.sas.util.transforms.TransformInputOutputInterface
Returns:
Item The output class from the transform of the input class.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.