Package org.teiid.core.types.basic
Class NullToAnyTransform
- java.lang.Object
-
- org.teiid.core.types.Transform
-
- org.teiid.core.types.basic.NullToAnyTransform
-
public class NullToAnyTransform extends Transform
This class can do a simple null to anything. Incoming value must be null and outgoing value is the same. This is purely for type purposes.
-
-
Field Summary
Fields Modifier and Type Field Description static NullToAnyTransform
INSTANCE
-
Constructor Summary
Constructors Constructor Description NullToAnyTransform(Class<?> targetType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getSourceType()
Type of the incoming value.Class
getTargetType()
Type of the outgoing value.Object
transformDirect(Object value)
This method transforms a value of the source type into a value of the target type.-
Methods inherited from class org.teiid.core.types.Transform
getDescription, getDisplayName, getSourceTypeName, getTargetTypeName, isExplicit, toString, transform
-
-
-
-
Field Detail
-
INSTANCE
public static final NullToAnyTransform INSTANCE
-
-
Constructor Detail
-
NullToAnyTransform
public NullToAnyTransform(Class<?> targetType)
-
-
Method Detail
-
getSourceType
public Class getSourceType()
Type of the incoming value.- Specified by:
getSourceType
in classTransform
- Returns:
- Source type
-
getTargetType
public Class getTargetType()
Type of the outgoing value.- Specified by:
getTargetType
in classTransform
- Returns:
- Target type
-
transformDirect
public Object transformDirect(Object value) throws TransformationException
This method transforms a value of the source type into a value of the target type.- Specified by:
transformDirect
in classTransform
- Parameters:
value
- Incoming value - Integer- Returns:
- Outgoing value - String
- Throws:
TransformationException
- if value is an incorrect input type or the transformation fails
-
-