use of org.pentaho.di.core.exception.KettleDatabaseException in project pentaho-kettle by pentaho.
the class JobEntryColumnsExist method saveRep.
public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_job) throws KettleException {
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), "tablename", tablename);
rep.saveJobEntryAttribute(id_job, getObjectId(), "schemaname", schemaname);
rep.saveDatabaseMetaJobEntryAttribute(id_job, getObjectId(), "connection", "id_database", connection);
// save the arguments...
if (arguments != null) {
for (int i = 0; i < arguments.length; i++) {
rep.saveJobEntryAttribute(id_job, getObjectId(), i, "name", arguments[i]);
}
}
} catch (KettleDatabaseException dbe) {
throw new KettleException(BaseMessages.getString(PKG, "JobEntryColumnsExist.Meta.UnableSaveRep", "" + id_job), dbe);
}
}
use of org.pentaho.di.core.exception.KettleDatabaseException in project pentaho-kettle by pentaho.
the class JobEntryConnectedToRepository method saveRep.
// Save the attributes of this job entry
//
public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_job) throws KettleException {
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), "isspecificrep", isspecificrep);
rep.saveJobEntryAttribute(id_job, getObjectId(), "repname", repname);
rep.saveJobEntryAttribute(id_job, getObjectId(), "isspecificuser", isspecificuser);
rep.saveJobEntryAttribute(id_job, getObjectId(), "username", username);
} catch (KettleDatabaseException dbe) {
throw new KettleException(BaseMessages.getString(PKG, "JobEntryConnectedToRepository.Meta.UnableToSaveToRep") + id_job, dbe);
}
}
use of org.pentaho.di.core.exception.KettleDatabaseException in project pentaho-kettle by pentaho.
the class JobEntryCopyFiles method saveRep.
public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_job) throws KettleException {
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), "copy_empty_folders", copy_empty_folders);
rep.saveJobEntryAttribute(id_job, getObjectId(), "arg_from_previous", arg_from_previous);
rep.saveJobEntryAttribute(id_job, getObjectId(), "overwrite_files", overwrite_files);
rep.saveJobEntryAttribute(id_job, getObjectId(), "include_subfolders", include_subfolders);
rep.saveJobEntryAttribute(id_job, getObjectId(), "remove_source_files", remove_source_files);
rep.saveJobEntryAttribute(id_job, getObjectId(), "add_result_filesname", add_result_filesname);
rep.saveJobEntryAttribute(id_job, getObjectId(), "destination_is_a_file", destination_is_a_file);
rep.saveJobEntryAttribute(id_job, getObjectId(), "create_destination_folder", create_destination_folder);
// save the arguments...
if (source_filefolder != null) {
for (int i = 0; i < source_filefolder.length; i++) {
saveSourceRep(rep, id_job, getObjectId(), i, source_filefolder[i]);
saveDestinationRep(rep, id_job, getObjectId(), i, destination_filefolder[i]);
rep.saveJobEntryAttribute(id_job, getObjectId(), i, "wildcard", wildcard[i]);
}
}
} catch (KettleDatabaseException dbe) {
throw new KettleException(BaseMessages.getString(PKG, "JobCopyFiles.Error.Exception.UnableSaveRep") + id_job, dbe);
}
}
use of org.pentaho.di.core.exception.KettleDatabaseException in project pentaho-kettle by pentaho.
the class JobEntryCopyMoveResultFilenames method saveRep.
public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_job) throws KettleException {
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), "foldername", foldername);
rep.saveJobEntryAttribute(id_job, getObjectId(), "specify_wildcard", specifywildcard);
rep.saveJobEntryAttribute(id_job, getObjectId(), "wildcard", wildcard);
rep.saveJobEntryAttribute(id_job, getObjectId(), "wildcardexclude", wildcardexclude);
rep.saveJobEntryAttribute(id_job, getObjectId(), "destination_folder", destination_folder);
rep.saveJobEntryAttribute(id_job, getObjectId(), "nr_errors_less_than", nr_errors_less_than);
rep.saveJobEntryAttribute(id_job, getObjectId(), "success_condition", success_condition);
rep.saveJobEntryAttribute(id_job, getObjectId(), "add_date", add_date);
rep.saveJobEntryAttribute(id_job, getObjectId(), "add_time", add_time);
rep.saveJobEntryAttribute(id_job, getObjectId(), "SpecifyFormat", SpecifyFormat);
rep.saveJobEntryAttribute(id_job, getObjectId(), "date_time_format", date_time_format);
rep.saveJobEntryAttribute(id_job, getObjectId(), "AddDateBeforeExtension", AddDateBeforeExtension);
rep.saveJobEntryAttribute(id_job, getObjectId(), "action", action);
rep.saveJobEntryAttribute(id_job, getObjectId(), "OverwriteFile", OverwriteFile);
rep.saveJobEntryAttribute(id_job, getObjectId(), "CreateDestinationFolder", CreateDestinationFolder);
rep.saveJobEntryAttribute(id_job, getObjectId(), "RemovedSourceFilename", RemovedSourceFilename);
rep.saveJobEntryAttribute(id_job, getObjectId(), "AddDestinationFilename", AddDestinationFilename);
} catch (KettleDatabaseException dbe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryCopyMoveResultFilenames.CanNotSaveToRep", "" + id_job, dbe.getMessage()));
}
}
use of org.pentaho.di.core.exception.KettleDatabaseException in project pentaho-kettle by pentaho.
the class JobEntryCreateFile method saveRep.
public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_job) throws KettleException {
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), "filename", filename);
rep.saveJobEntryAttribute(id_job, getObjectId(), "fail_if_file_exists", failIfFileExists);
rep.saveJobEntryAttribute(id_job, getObjectId(), "add_filename_result", addfilenameresult);
} catch (KettleDatabaseException dbe) {
throw new KettleException("Unable to save job entry of type 'create file' to the repository for id_job=" + id_job, dbe);
}
}
Aggregations