Search in sources :

Example 61 with ValueMetaBoolean

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());
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMetaAndData(org.pentaho.di.core.RowMetaAndData) ValueMetaBoolean(org.pentaho.di.core.row.value.ValueMetaBoolean)

Example 62 with ValueMetaBoolean

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;
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMetaAndData(org.pentaho.di.core.RowMetaAndData) LongObjectId(org.pentaho.di.repository.LongObjectId) ObjectId(org.pentaho.di.repository.ObjectId) ValueMetaInteger(org.pentaho.di.core.row.value.ValueMetaInteger) ValueMetaBoolean(org.pentaho.di.core.row.value.ValueMetaBoolean)

Example 63 with ValueMetaBoolean

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;
}
Also used : RowMetaAndData(org.pentaho.di.core.RowMetaAndData) LongObjectId(org.pentaho.di.repository.LongObjectId) ObjectId(org.pentaho.di.repository.ObjectId) ValueMetaInteger(org.pentaho.di.core.row.value.ValueMetaInteger) ValueMetaBoolean(org.pentaho.di.core.row.value.ValueMetaBoolean)

Example 64 with ValueMetaBoolean

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;
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) RowMetaAndData(org.pentaho.di.core.RowMetaAndData) ValueMetaInteger(org.pentaho.di.core.row.value.ValueMetaInteger) ValueMetaBoolean(org.pentaho.di.core.row.value.ValueMetaBoolean)

Example 65 with ValueMetaBoolean

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;
}
Also used : RowMetaAndData(org.pentaho.di.core.RowMetaAndData) LongObjectId(org.pentaho.di.repository.LongObjectId) ObjectId(org.pentaho.di.repository.ObjectId) ValueMetaInteger(org.pentaho.di.core.row.value.ValueMetaInteger) ValueMetaBoolean(org.pentaho.di.core.row.value.ValueMetaBoolean)

Aggregations

ValueMetaBoolean (org.pentaho.di.core.row.value.ValueMetaBoolean)84 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)68 ValueMetaInteger (org.pentaho.di.core.row.value.ValueMetaInteger)60 ValueMetaInterface (org.pentaho.di.core.row.ValueMetaInterface)46 ValueMetaDate (org.pentaho.di.core.row.value.ValueMetaDate)44 ValueMetaNumber (org.pentaho.di.core.row.value.ValueMetaNumber)32 ValueMetaBigNumber (org.pentaho.di.core.row.value.ValueMetaBigNumber)25 RowMeta (org.pentaho.di.core.row.RowMeta)22 RowMetaAndData (org.pentaho.di.core.RowMetaAndData)20 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)20 ValueMetaTimestamp (org.pentaho.di.core.row.value.ValueMetaTimestamp)18 Test (org.junit.Test)16 ValueMetaInternetAddress (org.pentaho.di.core.row.value.ValueMetaInternetAddress)15 KettleException (org.pentaho.di.core.exception.KettleException)13 ValueMetaBinary (org.pentaho.di.core.row.value.ValueMetaBinary)13 ObjectId (org.pentaho.di.repository.ObjectId)12 LongObjectId (org.pentaho.di.repository.LongObjectId)9 KettleStepException (org.pentaho.di.core.exception.KettleStepException)8 KettleXMLException (org.pentaho.di.core.exception.KettleXMLException)7 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)6