com.metamatrix.common.types.basic
Class NullToAnyTransform
java.lang.Object
com.metamatrix.common.types.AbstractTransform
com.metamatrix.common.types.basic.NullToAnyTransform
- All Implemented Interfaces:
- Transform
public class NullToAnyTransform
- extends AbstractTransform
This class can do a simple null-->anything.
Incoming value must be null and outgoing value is the same.
This is purely for type purposes.
Method Summary |
java.lang.Class |
getSourceType()
Type of the incoming value. |
java.lang.Class |
getTargetType()
Type of the outgoing value. |
java.lang.Object |
transform(java.lang.Object value)
This method transforms a value of the source type into a value
of the target type. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NullToAnyTransform
public NullToAnyTransform(java.lang.Class<?> targetType)
getSourceType
public java.lang.Class getSourceType()
- Type of the incoming value.
- Specified by:
getSourceType
in interface Transform
- Specified by:
getSourceType
in class AbstractTransform
- Returns:
- Source type
getTargetType
public java.lang.Class getTargetType()
- Type of the outgoing value.
- Specified by:
getTargetType
in interface Transform
- Specified by:
getTargetType
in class AbstractTransform
- Returns:
- Target type
transform
public java.lang.Object transform(java.lang.Object value)
throws TransformationException
- This method transforms a value of the source type into a value
of the target type.
- Specified by:
transform
in interface Transform
- Specified by:
transform
in class AbstractTransform
- Parameters:
value
- Incoming value - Integer
- Returns:
- Outgoing value - String
- Throws:
TransformationException
- if value is an incorrect input type or
the transformation fails
Copyright © 2009. All Rights Reserved.