use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class CreditCardValidatorMeta method getFields.
public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
String realresultfieldname = space.environmentSubstitute(resultfieldname);
if (!Utils.isEmpty(realresultfieldname)) {
ValueMetaInterface v = new ValueMetaBoolean(realresultfieldname);
v.setOrigin(name);
inputRowMeta.addValueMeta(v);
}
String realcardtype = space.environmentSubstitute(cardtype);
if (!Utils.isEmpty(realcardtype)) {
ValueMetaInterface v = new ValueMetaString(realcardtype);
v.setOrigin(name);
inputRowMeta.addValueMeta(v);
}
String realnotvalidmsg = space.environmentSubstitute(notvalidmsg);
if (!Utils.isEmpty(notvalidmsg)) {
ValueMetaInterface v = new ValueMetaString(realnotvalidmsg);
v.setOrigin(name);
inputRowMeta.addValueMeta(v);
}
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class DetectLastRowMeta method getFields.
public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
if (!Utils.isEmpty(resultfieldname)) {
ValueMetaInterface v = new ValueMetaBoolean(space.environmentSubstitute(resultfieldname));
v.setOrigin(name);
row.addValueMeta(v);
}
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class MemoryGroupByMetaTest method getInputRowMeta.
private RowMetaInterface getInputRowMeta() {
RowMetaInterface rm = new RowMeta();
rm.addValueMeta(new ValueMetaString("myGroupField2"));
rm.addValueMeta(new ValueMetaString("myGroupField1"));
rm.addValueMeta(new ValueMetaString("myString"));
rm.addValueMeta(new ValueMetaInteger("myInteger"));
rm.addValueMeta(new ValueMetaNumber("myNumber"));
rm.addValueMeta(new ValueMetaBigNumber("myBigNumber"));
rm.addValueMeta(new ValueMetaBinary("myBinary"));
rm.addValueMeta(new ValueMetaBoolean("myBoolean"));
rm.addValueMeta(new ValueMetaDate("myDate"));
rm.addValueMeta(new ValueMetaTimestamp("myTimestamp"));
rm.addValueMeta(new ValueMetaInternetAddress("myInternetAddress"));
return rm;
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class SpeedTest method populateMetaAndData.
private static void populateMetaAndData(int i, Object[] rowString10, RowMetaInterface metaString10, Object[] rowMixed10, RowMetaInterface metaMixed10) {
rowString10[i] = StringUtil.generateRandomString(20, "", "", false);
ValueMetaInterface meta = new ValueMetaString("String" + (i + 1), 20, 0);
metaString10.addValueMeta(meta);
rowMixed10[i * 5 + 0] = StringUtil.generateRandomString(20, "", "", false);
ValueMetaInterface meta0 = new ValueMetaString("String" + (i * 5 + 1), 20, 0);
metaMixed10.addValueMeta(meta0);
rowMixed10[i * 5 + 1] = new Date();
ValueMetaInterface meta1 = new ValueMetaDate("String" + (i * 5 + 1));
metaMixed10.addValueMeta(meta1);
rowMixed10[i * 5 + 2] = new Double(Math.random() * 1000000);
ValueMetaInterface meta2 = new ValueMetaNumber("String" + (i * 5 + 1), 12, 4);
metaMixed10.addValueMeta(meta2);
rowMixed10[i * 5 + 3] = new Long((long) (Math.random() * 1000000));
ValueMetaInterface meta3 = new ValueMetaInteger("String" + (i * 5 + 1), 8, 0);
metaMixed10.addValueMeta(meta3);
rowMixed10[i * 5 + 4] = Boolean.valueOf(Math.random() > 0.5 ? true : false);
ValueMetaInterface meta4 = new ValueMetaBoolean("String" + (i * 5 + 1));
metaMixed10.addValueMeta(meta4);
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class CloneRowMeta method getFields.
public void getFields(RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
// Output field (boolean) ?
if (addcloneflag) {
String realfieldValue = space.environmentSubstitute(cloneflagfield);
if (!Utils.isEmpty(realfieldValue)) {
ValueMetaInterface v = new ValueMetaBoolean(realfieldValue);
v.setOrigin(origin);
rowMeta.addValueMeta(v);
}
}
// Output clone row number
if (addclonenum) {
String realfieldValue = space.environmentSubstitute(clonenumfield);
if (!Utils.isEmpty(realfieldValue)) {
ValueMetaInterface v = new ValueMetaInteger(realfieldValue);
v.setOrigin(origin);
rowMeta.addValueMeta(v);
}
}
}
Aggregations