本文整理匯總了Java中edacc.model.ResultCode類的典型用法代碼示例。如果您正苦於以下問題:Java ResultCode類的具體用法?Java ResultCode怎麽用?Java ResultCode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ResultCode類屬於edacc.model包,在下文中一共展示了ResultCode類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: jobReset
import edacc.model.ResultCode; //導入依賴的package包/類
protected void jobReset(ExperimentResult er) {
if (er.getStatus().equals(StatusCode.RUNNING)) {
numRunningJobs--;
}
if (!er.getStatus().equals(StatusCode.NOT_STARTED) && !er.getStatus().equals(StatusCode.RUNNING)) {
numFinishedJobs--;
}
if (String.valueOf(er.getResultCode().getResultCode()).startsWith("1")) {
numSuccessfulJobs--;
}
if (!er.getStatus().equals(StatusCode.NOT_STARTED)) {
numNotStartedJobs++;
}
er.setStatus(StatusCode.NOT_STARTED);
er.setResultCode(ResultCode.UNKNOWN);
}
示例2: testSaveNewCode
import edacc.model.ResultCode; //導入依賴的package包/類
/**
* Test of saveNewCode method, of class ManageDBResultCodes.
*/
@Test
public void testSaveNewCode() throws Exception {
System.out.println("saveNewCode");
int code = 42;
String description = "The Answer to the Ultimate Question of Life, the Universe, and Everything";
ManageDBResultCodes writeInstance = ManageDBResultCodes.getInstance();
writeInstance.saveNewCode(code, description);
LinkedList<ResultCode> all = ResultCodeDAO.getAll();
assertTrue(all.contains(new ResultCode(code, description)));
LinkedList<ResultCode> remove = new LinkedList<ResultCode>();
remove.add(ResultCodeDAO.getByResultCode(code));
ResultCodeDAO.remove(remove);
}
示例3: getResultCode
import edacc.model.ResultCode; //導入依賴的package包/類
@Override
public ResultCode getResultCode() {
if (status.equals(StatusCode.NOT_STARTED) || status.equals(StatusCode.RUNNING)) {
return ResultCode.UNKNOWN;
} else {
return er.getResultCode();
}
}
示例4: saveNewCode
import edacc.model.ResultCode; //導入依賴的package包/類
public void saveNewCode(int code, String description) throws SQLException {
if (description.length() > 255)
throw new IllegalArgumentException("Description too long! Maximal length: 255 characters.");
ResultCode rc = new ResultCode(code, description);
ResultCodeDAO.save(rc);
ResultCodeTableModel.getInstance().add(rc);
}
示例5: remove
import edacc.model.ResultCode; //導入依賴的package包/類
public void remove(int[] sel) throws SQLException {
LinkedList<ResultCode> codes = new LinkedList<ResultCode>();
for (int i : sel) {
codes.add(ResultCodeTableModel.getInstance().getResultCode(i));
}
ResultCodeTableModel.getInstance().removeAll(codes);
ResultCodeDAO.remove(codes);
}
示例6: ResultCodeTableModel
import edacc.model.ResultCode; //導入依賴的package包/類
private ResultCodeTableModel() {
resultCodes = new ArrayList<ResultCode>();
}
示例7: addList
import edacc.model.ResultCode; //導入依賴的package包/類
public void addList(Collection<ResultCode> add) {
resultCodes.addAll(add);
fireTableDataChanged();
}
示例8: getResultCode
import edacc.model.ResultCode; //導入依賴的package包/類
public ResultCode getResultCode(int i) {
return resultCodes.get(i);
}
示例9: removeAll
import edacc.model.ResultCode; //導入依賴的package包/類
void removeAll(Collection<ResultCode> rcs) {
resultCodes.removeAll(rcs);
fireTableDataChanged();
}
示例10: updateCPUTimeLimit
import edacc.model.ResultCode; //導入依賴的package包/類
/**
* Updates the CPU time limit, the status and the result code of the given
* job
*
* @param idJob ID of the job.
* @param cputimelimit the new CPU time limit.
* @param statusCode the new status code.
* @param resultCode the new result code.
* @return
* @throws Exception
*/
public ExperimentResult updateCPUTimeLimit(int idJob, int cputimelimit, StatusCode statusCode, ResultCode resultCode) throws Exception;