Search in sources :

Example 1 with BackUpErrorLog

use of com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLog in project cubrid-manager by CUBRID.

the class BackupErrLogDialog method loadData.

/**
	 * load the data
	 * 
	 * @param shell Shell
	 * @return boolean
	 */
public boolean loadData(Shell shell) {
    CommonQueryTask<BackUpErrorLogList> task = new CommonQueryTask<BackUpErrorLogList>(database.getServer().getServerInfo(), CommonSendMsg.getCommonSimpleSendMsg(), new BackUpErrorLogList());
    connect(-1, new SocketTask[] { task }, true, shell);
    if (task.getErrorMsg() != null) {
        return false;
    }
    List<BackUpErrorLog> allErrLogList = task.getResultModel().getErrorLogList();
    if (allErrLogList != null) {
        for (BackUpErrorLog backUpErrorLog : allErrLogList) {
            if (backUpErrorLog.getDbname().equals(database.getName())) {
                errorLogList.addError(backUpErrorLog);
            }
        }
    }
    return true;
}
Also used : CommonQueryTask(com.cubrid.cubridmanager.core.common.task.CommonQueryTask) BackUpErrorLogList(com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLogList) BackUpErrorLog(com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLog)

Example 2 with BackUpErrorLog

use of com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLog in project cubrid-manager by CUBRID.

the class BackupErrLogDialog method initialTableModel.

/**
	 * initializes table model
	 * 
	 */
private void initialTableModel() {
    errorLogsInfoTableList = new ArrayList<Map<String, Object>>();
    for (int i = 0; errorLogList != null && errorLogList.getErrorLogList() != null && i < errorLogList.getErrorLogList().size(); i++) {
        BackUpErrorLog bean = errorLogList.getErrorLogList().get(i);
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("0", bean.getDbname());
        map.put("1", bean.getBackupid());
        map.put("2", bean.getError_time());
        map.put("3", bean.getError_desc());
        errorLogsInfoTableList.add(map);
    }
}
Also used : HashMap(java.util.HashMap) HashMap(java.util.HashMap) Map(java.util.Map) BackUpErrorLog(com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLog)

Aggregations

BackUpErrorLog (com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLog)2 CommonQueryTask (com.cubrid.cubridmanager.core.common.task.CommonQueryTask)1 BackUpErrorLogList (com.cubrid.cubridmanager.core.cubrid.jobauto.model.errlog.BackUpErrorLogList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1