本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryCopy.getNr方法的典型用法代码示例。如果您正苦于以下问题:Java JobEntryCopy.getNr方法的具体用法?Java JobEntryCopy.getNr怎么用?Java JobEntryCopy.getNr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.job.entry.JobEntryCopy
的用法示例。
在下文中一共展示了JobEntryCopy.getNr方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findJobEntryResult
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
private JobEntryResult findJobEntryResult(JobEntryCopy jobEntryCopy) {
if (jobEntryResults==null) return null;
Iterator<JobEntryResult> iterator = jobEntryResults.iterator();
while (iterator.hasNext()) {
JobEntryResult jobEntryResult = iterator.next();
if (jobEntryResult.getJobEntryName().equals(jobEntryCopy.getName()) &&
jobEntryResult.getJobEntryNr() == jobEntryCopy.getNr()
) {
return jobEntryResult;
}
}
return null;
}
示例2: findJobEntry
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
/**
* Find an existing JobEntryCopy by it's name and number
*
* @param name
* The name of the job entry copy
* @param nr
* The number of the job entry copy
* @return The JobEntryCopy or null if nothing was found!
*/
public JobEntryCopy findJobEntry(String name, int nr, boolean searchHiddenToo) {
for (int i = 0; i < nrJobEntries(); i++) {
JobEntryCopy jec = getJobEntry(i);
if (jec.getName().equalsIgnoreCase(name) && jec.getNr() == nr) {
if (searchHiddenToo || jec.isDrawn()) {
return jec;
}
}
}
return null;
}
示例3: findMaxNr
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public int findMaxNr(String name) {
int max = 0;
for (int i = 0; i < nrJobEntries(); i++) {
JobEntryCopy je = getJobEntry(i);
if (je.getName().equalsIgnoreCase(name)) {
if (je.getNr() > max)
max = je.getNr();
}
}
return max;
}
示例4: renameJobEntryIfNameCollides
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
/**
* See if the name of the supplied job entry copy doesn't collide with any
* other job entry copy in the job.
*
* @param je
* The job entry copy to verify the name for.
*/
public void renameJobEntryIfNameCollides(JobEntryCopy je) {
// First see if the name changed.
// If so, we need to verify that the name is not already used in the
// job.
//
String newname = je.getName();
// See if this name exists in the other job entries
//
boolean found;
int nr = 1;
do {
found = false;
for (JobEntryCopy copy : jobcopies) {
if (copy != je && copy.getName().equalsIgnoreCase(newname) && copy.getNr() == 0)
found = true;
}
if (found) {
nr++;
newname = je.getName() + " (" + nr + ")";
}
} while (found);
// Rename if required.
//
je.setName(newname);
}
示例5: findResult
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public static JobEntryCopyResult findResult(List<JobEntryCopyResult> results, JobEntryCopy copy) {
for (JobEntryCopyResult result : results) {
if (result.getJobEntryName().equalsIgnoreCase(copy.getName()) && result.getCopyNr()==copy.getNr()) {
return result;
}
}
return null;
}
示例6: findJobTracker
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
/**
* Finds the JobTracker for the job entry specified. Use this to
*
* @param jobEntryCopy
* The entry to search the job tracker for
* @return The JobTracker of null if none could be found...
*/
public JobTracker findJobTracker(JobEntryCopy jobEntryCopy) {
for (int i = jobTrackers.size() - 1; i >= 0; i--) {
JobTracker tracker = getJobTracker(i);
JobEntryResult result = tracker.getJobEntryResult();
if (result != null) {
if (jobEntryCopy.getName() != null && jobEntryCopy.getName().equals(result.getJobEntryName()) && jobEntryCopy.getNr() == result.getJobEntryNr()) {
return tracker;
}
}
}
return null;
}
示例7: JobEntryResult
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
@Deprecated
public JobEntryResult(Result result, String comment, String reason, JobEntryCopy copy) {
this(result, copy.getEntry().getLogChannel().getLogChannelId(), comment, reason, copy!=null ? copy.getName() : null, copy!=null ? copy.getNr() : 0, copy==null ? null : ( copy.getEntry()!=null ? copy.getEntry().getFilename() : null) );
}
示例8: getJobEntryCopyName
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
private String getJobEntryCopyName(JobEntryCopy copy) {
return copy.getName()+(copy.getNr()>0 ? copy.getNr() : "");
}
示例9: getInfo
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void getInfo()
{
try
{
configuration.setExecutingLocally(wExecLocal.getSelection());
configuration.setExecutingRemotely(wExecRemote.getSelection());
// Remote data
//
if (wExecRemote.getSelection())
{
String serverName = wRemoteHost.getText();
configuration.setRemoteServer(jobMeta.findSlaveServer(serverName));
}
configuration.setPassingExport(wPassExport.getSelection());
// various settings
//
if (!Const.isEmpty(wReplayDate.getText()))
{
configuration.setReplayDate(simpleDateFormat.parse(wReplayDate.getText()));
}
else
{
configuration.setReplayDate(null);
}
configuration.setSafeModeEnabled(wSafeMode.getSelection() );
configuration.setClearingLog(wClearLog.getSelection());
configuration.setLogLevel( LogLevel.values()[wLogLevel.getSelectionIndex()] );
String startCopyName = null;
int startCopyNr = 0;
if (!Const.isEmpty(wStartCopy.getText())) {
if (wStartCopy.getSelectionIndex()>=0) {
JobEntryCopy copy = jobMeta.getJobCopies().get(wStartCopy.getSelectionIndex());
startCopyName = copy.getName();
startCopyNr = copy.getNr();
}
}
configuration.setStartCopyName(startCopyName);
configuration.setStartCopyNr(startCopyNr);
// The lower part of the dialog...
getInfoParameters();
getInfoVariables();
getInfoArguments();
}
catch(Exception e)
{
new ErrorDialog(shell, "Error in settings", "There is an error in the dialog settings", e);
}
}
示例10: getLogRecord
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
/**
* This method calculates all the values that are required
* @param id the id to use or -1 if no id is needed
* @param status the log status to use
* @param subject the object to log
* @param parent the parent to which the object belongs
*/
public RowMetaAndData getLogRecord(LogStatus status, Object subject, Object parent) {
if (subject==null || subject instanceof JobEntryCopy) {
JobEntryCopy jobEntryCopy = (JobEntryCopy) subject;
Job parentJob = (Job) parent;
RowMetaAndData row = new RowMetaAndData();
for (LogTableField field : fields) {
if (field.isEnabled()) {
Object value = null;
if (subject!=null) {
JobEntryInterface jobEntry = jobEntryCopy.getEntry();
JobTracker jobTracker = parentJob.getJobTracker();
JobTracker entryTracker = jobTracker.findJobTracker(jobEntryCopy);
JobEntryResult jobEntryResult = null;
if (entryTracker!=null) {
jobEntryResult = entryTracker.getJobEntryResult();
}
Result result = null;
if (jobEntryResult!=null) {
result = jobEntryResult.getResult();
}
switch(ID.valueOf(field.getId())){
case ID_BATCH : value = new Long(parentJob.getBatchId()); break;
case CHANNEL_ID : value = jobEntry.getLogChannel().getLogChannelId(); break;
case LOG_DATE : value = new Date(); break;
case JOBNAME : value = parentJob.getJobname(); break;
case JOBENTRYNAME : value = jobEntry.getName(); break;
case LINES_READ : value = new Long(result!=null ? result.getNrLinesRead() : 0); break;
case LINES_WRITTEN : value = new Long(result!=null ? result.getNrLinesWritten() : 0); break;
case LINES_UPDATED : value = new Long(result!=null ? result.getNrLinesUpdated() : 0); break;
case LINES_INPUT : value = new Long(result!=null ? result.getNrLinesInput() : 0); break;
case LINES_OUTPUT : value = new Long(result!=null ? result.getNrLinesOutput() : 0); break;
case LINES_REJECTED : value = new Long(result!=null ? result.getNrLinesRejected() : 0); break;
case ERRORS : value = new Long(result!=null ? result.getNrErrors() : 0); break;
case RESULT : value = new Boolean(result!=null ? result.getResult() : false); break;
case NR_RESULT_FILES : value = new Long(result!=null && result.getResultFiles()!=null ? result.getResultFiles().size() : 0); break;
case NR_RESULT_ROWS : value = new Long(result!=null && result.getRows()!=null ? result.getRows().size() : 0); break;
case LOG_FIELD :
if (result!=null) {
value = result.getLogText();
}
break;
case COPY_NR : value = new Long(jobEntryCopy.getNr()); break;
}
}
row.addValue(field.getFieldName(), field.getDataType(), value);
row.getRowMeta().getValueMeta(row.size()-1).setLength(field.getLength());
}
}
return row;
}
else {
return null;
}
}