use of org.apache.hop.core.row.value.ValueMetaBoolean in project hop by apache.
the class CloneRowMeta method getFields.
@Override
public void getFields(IRowMeta rowMeta, String origin, IRowMeta[] info, TransformMeta nextTransform, IVariables variables, IHopMetadataProvider metadataProvider) throws HopTransformException {
// Output field (boolean) ?
if (addCloneFlag) {
String realfieldValue = variables.resolve(cloneFlagField);
if (!Utils.isEmpty(realfieldValue)) {
IValueMeta v = new ValueMetaBoolean(realfieldValue);
v.setOrigin(origin);
rowMeta.addValueMeta(v);
}
}
// Output clone row number
if (addCloneNum) {
String realfieldValue = variables.resolve(cloneNumField);
if (!Utils.isEmpty(realfieldValue)) {
IValueMeta v = new ValueMetaInteger(realfieldValue);
v.setOrigin(origin);
rowMeta.addValueMeta(v);
}
}
}
use of org.apache.hop.core.row.value.ValueMetaBoolean in project hop by apache.
the class FileExistsMeta method getFields.
@Override
public void getFields(IRowMeta inputRowMeta, String name, IRowMeta[] info, TransformMeta nextTransform, IVariables variables, IHopMetadataProvider metadataProvider) throws HopTransformException {
// Output fields (String)
if (!Utils.isEmpty(resultfieldname)) {
IValueMeta v = new ValueMetaBoolean(variables.resolve(resultfieldname));
v.setOrigin(name);
inputRowMeta.addValueMeta(v);
}
if (includefiletype && !Utils.isEmpty(filetypefieldname)) {
IValueMeta v = new ValueMetaString(variables.resolve(filetypefieldname));
v.setOrigin(name);
inputRowMeta.addValueMeta(v);
}
}
use of org.apache.hop.core.row.value.ValueMetaBoolean in project hop by apache.
the class MailInputMeta method getFields.
@Override
public void getFields(IRowMeta r, String name, IRowMeta[] info, TransformMeta nextTransform, IVariables variables, IHopMetadataProvider metadataProvider) throws HopTransformException {
int i;
for (i = 0; i < inputFields.length; i++) {
MailInputField field = inputFields[i];
IValueMeta v = new ValueMetaString(variables.resolve(field.getName()));
switch(field.getColumn()) {
case MailInputField.COLUMN_MESSAGE_NR:
case MailInputField.COLUMN_SIZE:
case MailInputField.COLUMN_ATTACHED_FILES_COUNT:
v = new ValueMetaInteger(variables.resolve(field.getName()));
v.setLength(IValueMeta.DEFAULT_INTEGER_LENGTH, 0);
break;
case MailInputField.COLUMN_RECEIVED_DATE:
case MailInputField.COLUMN_SENT_DATE:
v = new ValueMetaDate(variables.resolve(field.getName()));
break;
case MailInputField.COLUMN_FLAG_DELETED:
case MailInputField.COLUMN_FLAG_DRAFT:
case MailInputField.COLUMN_FLAG_FLAGGED:
case MailInputField.COLUMN_FLAG_NEW:
case MailInputField.COLUMN_FLAG_READ:
v = new ValueMetaBoolean(variables.resolve(field.getName()));
break;
default:
// STRING
v.setLength(250);
v.setPrecision(-1);
break;
}
v.setOrigin(name);
r.addValueMeta(v);
}
}
use of org.apache.hop.core.row.value.ValueMetaBoolean in project hop by apache.
the class GetTableNamesMeta method getFields.
@Override
public void getFields(IRowMeta r, String name, IRowMeta[] info, TransformMeta nextTransform, IVariables variables, IHopMetadataProvider metadataProvider) throws HopTransformException {
String realtablename = variables.resolve(tablenamefieldname);
if (!Utils.isEmpty(realtablename)) {
IValueMeta v = new ValueMetaString(realtablename);
v.setLength(500);
v.setPrecision(-1);
v.setOrigin(name);
r.addValueMeta(v);
}
String realObjectType = variables.resolve(objecttypefieldname);
if (!Utils.isEmpty(realObjectType)) {
IValueMeta v = new ValueMetaString(realObjectType);
v.setLength(500);
v.setPrecision(-1);
v.setOrigin(name);
r.addValueMeta(v);
}
String sysobject = variables.resolve(issystemobjectfieldname);
if (!Utils.isEmpty(sysobject)) {
IValueMeta v = new ValueMetaBoolean(sysobject);
v.setOrigin(name);
r.addValueMeta(v);
}
String realSqlCreation = variables.resolve(sqlcreationfieldname);
if (!Utils.isEmpty(realSqlCreation)) {
IValueMeta v = new ValueMetaString(realSqlCreation);
v.setLength(500);
v.setPrecision(-1);
v.setOrigin(name);
r.addValueMeta(v);
}
}
use of org.apache.hop.core.row.value.ValueMetaBoolean in project hop by apache.
the class FileLockedMeta method getFields.
@Override
public void getFields(IRowMeta inputRowMeta, String name, IRowMeta[] info, TransformMeta nextTransform, IVariables variables, IHopMetadataProvider metadataProvider) throws HopTransformException {
if (!Utils.isEmpty(resultfieldname)) {
IValueMeta v = new ValueMetaBoolean(resultfieldname);
v.setOrigin(name);
inputRowMeta.addValueMeta(v);
}
}
Aggregations