use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class KettleDatabaseRepositorySlaveServerDelegate method updateSlave.
public synchronized void updateSlave(SlaveServer slaveServer) throws KettleException {
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_NAME), slaveServer.getName());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_HOST_NAME), slaveServer.getHostname());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_PORT), slaveServer.getPort());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_WEB_APP_NAME), slaveServer.getWebAppName());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_USERNAME), slaveServer.getUsername());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_PASSWORD), Encr.encryptPasswordIfNotUsingVariables(slaveServer.getPassword()));
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_PROXY_HOST_NAME), slaveServer.getProxyHostname());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_PROXY_PORT), slaveServer.getProxyPort());
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_SLAVE_NON_PROXY_HOSTS), slaveServer.getNonProxyHosts());
table.addValue(new ValueMetaBoolean(KettleDatabaseRepository.FIELD_SLAVE_MASTER), Boolean.valueOf(slaveServer.isMaster()));
repository.connectionDelegate.updateTableRow(KettleDatabaseRepository.TABLE_R_SLAVE, KettleDatabaseRepository.FIELD_SLAVE_ID_SLAVE, table, slaveServer.getObjectId());
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class KettleDatabaseRepositoryStepDelegate method insertStep.
// CHECKSTYLE:LineLength:OFF
public synchronized ObjectId insertStep(ObjectId id_transformation, String name, String description, String steptype, boolean distribute, long copies, long gui_location_x, long gui_location_y, boolean gui_draw, String copiesString) throws KettleException {
ObjectId id = repository.connectionDelegate.getNextStepID();
ObjectId id_step_type = getStepTypeID(steptype);
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_STEP_ID_STEP), id);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_STEP_ID_TRANSFORMATION), id_transformation);
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_STEP_NAME), name);
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_STEP_DESCRIPTION), description);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_STEP_ID_STEP_TYPE), id_step_type);
table.addValue(new ValueMetaBoolean(KettleDatabaseRepository.FIELD_STEP_DISTRIBUTE), Boolean.valueOf(distribute));
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_STEP_COPIES), new Long(copies));
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_STEP_GUI_LOCATION_X), new Long(gui_location_x));
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_STEP_GUI_LOCATION_Y), new Long(gui_location_y));
table.addValue(new ValueMetaBoolean(KettleDatabaseRepository.FIELD_STEP_GUI_DRAW), Boolean.valueOf(gui_draw));
table.addValue(new ValueMetaString(KettleDatabaseRepository.FIELD_STEP_COPIES_STRING), copiesString);
repository.connectionDelegate.getDatabase().prepareInsert(table.getRowMeta(), KettleDatabaseRepository.TABLE_R_STEP);
repository.connectionDelegate.getDatabase().setValuesInsert(table);
repository.connectionDelegate.getDatabase().insertRow();
repository.connectionDelegate.getDatabase().closeInsert();
return id;
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class KettleDatabaseRepositoryTransDelegate method insertTransHop.
private synchronized ObjectId insertTransHop(ObjectId id_transformation, ObjectId id_step_from, ObjectId id_step_to, boolean enabled) throws KettleException {
ObjectId id = repository.connectionDelegate.getNextTransHopID();
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_TRANS_HOP_ID_TRANS_HOP), id);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_TRANS_HOP_ID_TRANSFORMATION), id_transformation);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_TRANS_HOP_ID_STEP_FROM), id_step_from);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_TRANS_HOP_ID_STEP_TO), id_step_to);
table.addValue(new ValueMetaBoolean(KettleDatabaseRepository.FIELD_TRANS_HOP_ENABLED), Boolean.valueOf(enabled));
repository.connectionDelegate.getDatabase().prepareInsert(table.getRowMeta(), KettleDatabaseRepository.TABLE_R_TRANS_HOP);
repository.connectionDelegate.getDatabase().setValuesInsert(table);
repository.connectionDelegate.getDatabase().insertRow();
repository.connectionDelegate.getDatabase().closeInsert();
return id;
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class KettleDatabaseRepositoryUserDelegate method fillTableRow.
public RowMetaAndData fillTableRow(IUser userInfo) {
RowMetaAndData r = new RowMetaAndData();
r.addValue(new ValueMetaInteger("ID_USER"), userInfo.getObjectId());
r.addValue(new ValueMetaString("LOGIN"), userInfo.getLogin());
r.addValue(new ValueMetaString("PASSWORD"), Encr.encryptPassword(userInfo.getPassword()));
r.addValue(new ValueMetaString("NAME"), userInfo.getUsername());
r.addValue(new ValueMetaString("DESCRIPTION"), userInfo.getDescription());
r.addValue(new ValueMetaBoolean("ENABLED"), Boolean.valueOf(userInfo.isEnabled()));
return r;
}
use of org.pentaho.di.core.row.value.ValueMetaBoolean in project pentaho-kettle by pentaho.
the class KettleDatabaseRepositoryJobEntryDelegate method insertJobEntryCopy.
public synchronized ObjectId insertJobEntryCopy(ObjectId id_job, ObjectId id_jobentry, ObjectId id_jobentry_type, int nr, long gui_location_x, long gui_location_y, boolean gui_draw, boolean parallel) throws KettleException {
ObjectId id = repository.connectionDelegate.getNextJobEntryCopyID();
RowMetaAndData table = new RowMetaAndData();
// CHECKSTYLE:LineLength:OFF
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOBENTRY_COPY), id);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOBENTRY), id_jobentry);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOB), id_job);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOBENTRY_TYPE), id_jobentry_type);
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_NR), new Long(nr));
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_GUI_LOCATION_X), new Long(gui_location_x));
table.addValue(new ValueMetaInteger(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_GUI_LOCATION_Y), new Long(gui_location_y));
table.addValue(new ValueMetaBoolean(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_GUI_DRAW), Boolean.valueOf(gui_draw));
table.addValue(new ValueMetaBoolean(KettleDatabaseRepository.FIELD_JOBENTRY_COPY_PARALLEL), Boolean.valueOf(parallel));
repository.connectionDelegate.getDatabase().prepareInsert(table.getRowMeta(), KettleDatabaseRepository.TABLE_R_JOBENTRY_COPY);
repository.connectionDelegate.getDatabase().setValuesInsert(table);
repository.connectionDelegate.getDatabase().insertRow();
repository.connectionDelegate.getDatabase().closeInsert();
return id;
}
Aggregations