Package org.pentaho.di.core.injection
Class NullNumberConverter
- java.lang.Object
-
- org.pentaho.di.core.injection.InjectionTypeConverter
-
- org.pentaho.di.core.injection.DefaultInjectionTypeConverter
-
- org.pentaho.di.core.injection.NullNumberConverter
-
public class NullNumberConverter extends DefaultInjectionTypeConverter
An extension to theDefaultInjectionTypeConverter
that converts null and empty values to -1 for number/int type variables. This ensures that 0's aren't inserted for field values that are meant to remain empty. This assumes that the step dialog knows to treat field values set to -1 as "empty".
-
-
Constructor Summary
Constructors Constructor Description NullNumberConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
integer2intPrimitive(Long v)
int
number2intPrimitive(Double v)
int
string2intPrimitive(String v)
-
Methods inherited from class org.pentaho.di.core.injection.DefaultInjectionTypeConverter
boolean2boolean, boolean2booleanPrimitive, boolean2integer, boolean2intPrimitive, boolean2long, boolean2longPrimitive, boolean2string, integer2boolean, integer2booleanPrimitive, integer2integer, integer2long, integer2longPrimitive, integer2string, number2boolean, number2booleanPrimitive, number2integer, number2long, number2longPrimitive, number2string, string2boolean, string2booleanPrimitive, string2enum, string2integer, string2long, string2longPrimitive, string2string
-
Methods inherited from class org.pentaho.di.core.injection.InjectionTypeConverter
boolean2enum, integer2enum, number2enum
-
-
-
-
Method Detail
-
string2intPrimitive
public int string2intPrimitive(String v)
- Overrides:
string2intPrimitive
in classDefaultInjectionTypeConverter
-
integer2intPrimitive
public int integer2intPrimitive(Long v)
- Overrides:
integer2intPrimitive
in classDefaultInjectionTypeConverter
-
number2intPrimitive
public int number2intPrimitive(Double v)
- Overrides:
number2intPrimitive
in classDefaultInjectionTypeConverter
-
-