public CFSecuritySecDeviceBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "CFAsteriskRamSecDevice.readAllDerived"; CFSecuritySecDeviceBuff[] retList = new CFSecuritySecDeviceBuff[dictByPKey.values().size()]; Iterator<CFSecuritySecDeviceBuff> iter = dictByPKey.values().iterator(); int idx = 0; while (iter.hasNext()) { retList[idx++] = iter.next(); } return (retList); }
public CFSecurityCursor openSecDeviceCursorByUserIdx( CFSecurityAuthorization Authorization, UUID SecUserId) { CFSecurityCursor cursor; CFSecuritySecDeviceByUserIdxKey key = schema.getFactorySecDevice().newUserIdxKey(); key.setRequiredSecUserId(SecUserId); if (dictByUserIdx.containsKey(key)) { Map<CFSecuritySecDevicePKey, CFSecuritySecDeviceBuff> subdictUserIdx = dictByUserIdx.get(key); cursor = new CFAsteriskRamSecDeviceCursor(Authorization, schema, subdictUserIdx.values()); } else { cursor = new CFAsteriskRamSecDeviceCursor( Authorization, schema, new ArrayList<CFSecuritySecDeviceBuff>()); } return (cursor); }
public void deleteSecDeviceByUserIdx( CFSecurityAuthorization Authorization, CFSecuritySecDeviceByUserIdxKey argKey) { CFSecuritySecDeviceBuff cur; LinkedList<CFSecuritySecDeviceBuff> matchSet = new LinkedList<CFSecuritySecDeviceBuff>(); Iterator<CFSecuritySecDeviceBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFSecuritySecDeviceBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteSecDevice(Authorization, cur); } }
public CFSecuritySecDeviceBuff[] readDerivedByUserIdx( CFSecurityAuthorization Authorization, UUID SecUserId) { final String S_ProcName = "CFAsteriskRamSecDevice.readDerivedByUserIdx"; CFSecuritySecDeviceByUserIdxKey key = schema.getFactorySecDevice().newUserIdxKey(); key.setRequiredSecUserId(SecUserId); CFSecuritySecDeviceBuff[] recArray; if (dictByUserIdx.containsKey(key)) { Map<CFSecuritySecDevicePKey, CFSecuritySecDeviceBuff> subdictUserIdx = dictByUserIdx.get(key); recArray = new CFSecuritySecDeviceBuff[subdictUserIdx.size()]; Iterator<CFSecuritySecDeviceBuff> iter = subdictUserIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFSecuritySecDevicePKey, CFSecuritySecDeviceBuff> subdictUserIdx = new HashMap<CFSecuritySecDevicePKey, CFSecuritySecDeviceBuff>(); dictByUserIdx.put(key, subdictUserIdx); recArray = new CFSecuritySecDeviceBuff[0]; } return (recArray); }
public CFSecurityCursor openSecDeviceCursorAll(CFSecurityAuthorization Authorization) { CFSecurityCursor cursor = new CFAsteriskRamSecDeviceCursor(Authorization, schema, dictByPKey.values()); return (cursor); }