Search in sources :

Example 1 with BlockedHolders

use of com.cubrid.cubridmanager.core.cubrid.database.model.lock.BlockedHolders in project cubrid-manager by CUBRID.

the class LockInfoDetailDialog method initial.

/**
	 * 
	 * Initial data
	 * 
	 */
private void initial() {
    if (dbLotEntry == null) {
        return;
    }
    if (dbLotEntry.getLockHoldersList() != null) {
        for (LockHolders bean : dbLotEntry.getLockHoldersList()) {
            Map<String, String> map = new HashMap<String, String>();
            map.put("0", String.valueOf(bean.getTran_index()));
            map.put("1", bean.getGranted_mode());
            map.put("2", String.valueOf(bean.getCount()));
            map.put("3", String.valueOf(bean.getNsubgranules()));
            lockHolderListData.add(map);
        }
        lockHolderTableViewer.refresh();
        for (int i = 0; i < lockHolderTable.getColumnCount(); i++) {
            lockHolderTable.getColumn(i).pack();
        }
    }
    if (dbLotEntry.getBlockHoldersList() != null) {
        for (BlockedHolders bean : dbLotEntry.getBlockHoldersList()) {
            Map<String, String> map = new HashMap<String, String>();
            map.put("0", String.valueOf(bean.getTran_index()));
            map.put("1", bean.getGranted_mode());
            map.put("2", String.valueOf(bean.getCount()));
            map.put("3", String.valueOf(bean.getBlocked_mode()));
            map.put("4", String.valueOf(bean.getStart_at()));
            map.put("5", String.valueOf(bean.getWait_for_sec()));
            blockedHolderListData.add(map);
        }
        blockedHolderTableViewer.refresh();
        for (int i = 0; i < blockedHolderTable.getColumnCount(); i++) {
            blockedHolderTable.getColumn(i).pack();
        }
    }
    if (dbLotEntry.getLockWaitersList() != null) {
        for (LockWaiters bean : dbLotEntry.getLockWaitersList()) {
            Map<String, String> map = new HashMap<String, String>();
            map.put("0", String.valueOf(bean.getTran_index()));
            map.put("1", bean.getB_mode());
            map.put("2", String.valueOf(bean.getStart_at()));
            map.put("3", String.valueOf(bean.getWaitfornsec()));
            lockWaiterListData.add(map);
        }
        lockWaiterTableViewer.refresh();
        for (int i = 0; i < lockWaiterTable.getColumnCount(); i++) {
            lockWaiterTable.getColumn(i).pack();
        }
    }
    objectIdLabel.setText(Messages.bind(Messages.lblObjectId, dbLotEntry.getOid()));
    objectTypeLabel.setText(Messages.bind(Messages.lblObjectType, dbLotEntry.getOb_type()));
}
Also used : LockHolders(com.cubrid.cubridmanager.core.cubrid.database.model.lock.LockHolders) BlockedHolders(com.cubrid.cubridmanager.core.cubrid.database.model.lock.BlockedHolders) HashMap(java.util.HashMap) LockWaiters(com.cubrid.cubridmanager.core.cubrid.database.model.lock.LockWaiters)

Aggregations

BlockedHolders (com.cubrid.cubridmanager.core.cubrid.database.model.lock.BlockedHolders)1 LockHolders (com.cubrid.cubridmanager.core.cubrid.database.model.lock.LockHolders)1 LockWaiters (com.cubrid.cubridmanager.core.cubrid.database.model.lock.LockWaiters)1 HashMap (java.util.HashMap)1