public CFAccFeeBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "CFAccRamFee.readAllDerived"; CFAccFeeBuff[] retList = new CFAccFeeBuff[dictByPKey.values().size()]; Iterator<CFAccFeeBuff> iter = dictByPKey.values().iterator(); int idx = 0; while (iter.hasNext()) { retList[idx++] = iter.next(); } return (retList); }
public CFBamISOCurrencyBuff[] readAllDerived(CFBamAuthorization Authorization) { final String S_ProcName = "CFBamRamISOCurrency.readAllDerived() "; CFBamISOCurrencyBuff[] retList = new CFBamISOCurrencyBuff[dictByPKey.values().size()]; Iterator<CFBamISOCurrencyBuff> iter = dictByPKey.values().iterator(); int idx = 0; while (iter.hasNext()) { retList[idx++] = iter.next(); } return (retList); }
public void forgetDomainBySubDomIdx(long TenantId, long SubDomainOfId) { if (indexBySubDomIdx == null) { return; } CFInternetDomainBySubDomIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryDomain().newSubDomIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredSubDomainOfId(SubDomainOfId); if (indexBySubDomIdx.containsKey(key)) { Map<CFInternetDomainBasePKey, ICFInternetDomainObj> mapSubDomIdx = indexBySubDomIdx.get(key); if (mapSubDomIdx != null) { List<ICFInternetDomainObj> toForget = new LinkedList<ICFInternetDomainObj>(); ICFInternetDomainObj cur = null; Iterator<ICFInternetDomainObj> iter = mapSubDomIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexBySubDomIdx.remove(key); } }
public void forgetClearTopDepByContTblIdx(long TenantId, long ContTableId) { if (indexByContTblIdx == null) { return; } CFBamClearTopDepByContTblIdxKey key = schema.getBackingStore().getFactoryClearTopDep().newContTblIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContTableId(ContTableId); if (indexByContTblIdx.containsKey(key)) { Map<CFBamScopePKey, ICFBamClearTopDepObj> mapContTblIdx = indexByContTblIdx.get(key); if (mapContTblIdx != null) { List<ICFBamClearTopDepObj> toForget = new LinkedList<ICFBamClearTopDepObj>(); ICFBamClearTopDepObj cur = null; Iterator<ICFBamClearTopDepObj> iter = mapContTblIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByContTblIdx.remove(key); } }
public void deleteClearTopDepByContTblIdx(long TenantId, long ContTableId) { CFBamClearTopDepByContTblIdxKey key = schema.getBackingStore().getFactoryClearTopDep().newContTblIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContTableId(ContTableId); if (indexByContTblIdx == null) { indexByContTblIdx = new HashMap<CFBamClearTopDepByContTblIdxKey, Map<CFBamScopePKey, ICFBamClearTopDepObj>>(); } if (indexByContTblIdx.containsKey(key)) { Map<CFBamScopePKey, ICFBamClearTopDepObj> dict = indexByContTblIdx.get(key); schema .getBackingStore() .getTableClearTopDep() .deleteClearTopDepByContTblIdx(schema.getAuthorization(), TenantId, ContTableId); Iterator<ICFBamClearTopDepObj> iter = dict.values().iterator(); ICFBamClearTopDepObj obj; List<ICFBamClearTopDepObj> toForget = new LinkedList<ICFBamClearTopDepObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByContTblIdx.remove(key); } else { schema .getBackingStore() .getTableClearTopDep() .deleteClearTopDepByContTblIdx(schema.getAuthorization(), TenantId, ContTableId); } }
public CFSecuritySecGroupFormBuff[] readDerivedByFormIdx( CFSecurityAuthorization Authorization, long ClusterId, int SecFormId) { final String S_ProcName = "CFInternetRamSecGroupForm.readDerivedByFormIdx"; CFSecuritySecGroupFormByFormIdxKey key = schema.getFactorySecGroupForm().newFormIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredSecFormId(SecFormId); CFSecuritySecGroupFormBuff[] recArray; if (dictByFormIdx.containsKey(key)) { Map<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff> subdictFormIdx = dictByFormIdx.get(key); recArray = new CFSecuritySecGroupFormBuff[subdictFormIdx.size()]; Iterator<CFSecuritySecGroupFormBuff> iter = subdictFormIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff> subdictFormIdx = new HashMap<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff>(); dictByFormIdx.put(key, subdictFormIdx); recArray = new CFSecuritySecGroupFormBuff[0]; } return (recArray); }
public void deleteNumberDefByNextIdx( CFSecurityAuthorization Authorization, CFDbTestValueByNextIdxKey argKey) { final String S_ProcName = "deleteNumberDefByNextIdx"; CFDbTestNumberDefBuff cur; LinkedList<CFDbTestNumberDefBuff> matchSet = new LinkedList<CFDbTestNumberDefBuff>(); Iterator<CFDbTestNumberDefBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFDbTestNumberDefBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("NUMD".equals(subClassCode)) { schema.getTableNumberDef().deleteNumberDef(Authorization, cur); } else if ("NUMC".equals(subClassCode)) { schema.getTableNumberCol().deleteNumberCol(Authorization, (CFDbTestNumberColBuff) cur); } else if ("NUMT".equals(subClassCode)) { schema.getTableNumberType().deleteNumberType(Authorization, (CFDbTestNumberTypeBuff) cur); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of NumberDef must not be \"" + subClassCode + "\""); } } }
public CFSecuritySecSessionBuff[] readDerivedByFinishIdx( CFSecurityAuthorization Authorization, UUID SecUserId, Calendar Finish) { final String S_ProcName = "CFSecurityRamSecSession.readDerivedByFinishIdx"; CFSecuritySecSessionByFinishIdxKey key = schema.getFactorySecSession().newFinishIdxKey(); key.setRequiredSecUserId(SecUserId); key.setOptionalFinish(Finish); CFSecuritySecSessionBuff[] recArray; if (dictByFinishIdx.containsKey(key)) { Map<CFSecuritySecSessionPKey, CFSecuritySecSessionBuff> subdictFinishIdx = dictByFinishIdx.get(key); recArray = new CFSecuritySecSessionBuff[subdictFinishIdx.size()]; Iterator<CFSecuritySecSessionBuff> iter = subdictFinishIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFSecuritySecSessionPKey, CFSecuritySecSessionBuff> subdictFinishIdx = new HashMap<CFSecuritySecSessionPKey, CFSecuritySecSessionBuff>(); dictByFinishIdx.put(key, subdictFinishIdx); recArray = new CFSecuritySecSessionBuff[0]; } return (recArray); }
public void deleteTaxByTenantIdx(long TenantId) { CFAccTaxByTenantIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newTenantIdxKey(); key.setRequiredTenantId(TenantId); if (indexByTenantIdx == null) { indexByTenantIdx = new HashMap<CFAccTaxByTenantIdxKey, Map<CFAccTaxPKey, ICFAccTaxObj>>(); } if (indexByTenantIdx.containsKey(key)) { Map<CFAccTaxPKey, ICFAccTaxObj> dict = indexByTenantIdx.get(key); ((ICFAccSchema) schema.getBackingStore()) .getTableTax() .deleteTaxByTenantIdx(schema.getAuthorization(), TenantId); Iterator<ICFAccTaxObj> iter = dict.values().iterator(); ICFAccTaxObj obj; List<ICFAccTaxObj> toForget = new LinkedList<ICFAccTaxObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByTenantIdx.remove(key); } else { ((ICFAccSchema) schema.getBackingStore()) .getTableTax() .deleteTaxByTenantIdx(schema.getAuthorization(), TenantId); } }
public CFBamDelSubDep3Buff[] readDerivedByContDelDep2Idx( CFBamAuthorization Authorization, long ContTenantId, long ContDelDep2Id) { final String S_ProcName = "CFBamRamDelSubDep3.readDerivedByContDelDep2Idx() "; CFBamDelSubDep3ByContDelDep2IdxKey key = schema.getFactoryDelSubDep3().newContDelDep2IdxKey(); key.setRequiredContTenantId(ContTenantId); key.setRequiredContDelDep2Id(ContDelDep2Id); CFBamDelSubDep3Buff[] recArray; if (dictByContDelDep2Idx.containsKey(key)) { Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdictContDelDep2Idx = dictByContDelDep2Idx.get(key); recArray = new CFBamDelSubDep3Buff[subdictContDelDep2Idx.size()]; Iterator<CFBamDelSubDep3Buff> iter = subdictContDelDep2Idx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdictContDelDep2Idx = new HashMap<CFBamScopePKey, CFBamDelSubDep3Buff>(); dictByContDelDep2Idx.put(key, subdictContDelDep2Idx); recArray = new CFBamDelSubDep3Buff[0]; } return (recArray); }
public List<ICFAccTaxObj> readAllTax(boolean forceRead) { final String S_ProcName = "readAllTax"; if ((allTax == null) || forceRead) { Map<CFAccTaxPKey, ICFAccTaxObj> map = new HashMap<CFAccTaxPKey, ICFAccTaxObj>(); allTax = map; CFAccTaxBuff[] buffList = ((ICFAccSchema) schema.getBackingStore()) .getTableTax() .readAllDerived(schema.getAuthorization()); CFAccTaxBuff buff; ICFAccTaxObj obj; for (int idx = 0; idx < buffList.length; idx++) { buff = buffList[idx]; obj = newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newPKey()); obj.setBuff(buff); ICFAccTaxObj realized = (ICFAccTaxObj) obj.realize(); } } Comparator<ICFAccTaxObj> cmp = new Comparator<ICFAccTaxObj>() { public int compare(ICFAccTaxObj lhs, ICFAccTaxObj rhs) { if (lhs == null) { if (rhs == null) { return (0); } else { return (-1); } } else if (rhs == null) { return (1); } else { CFAccTaxPKey lhsPKey = lhs.getPKey(); CFAccTaxPKey rhsPKey = rhs.getPKey(); int ret = lhsPKey.compareTo(rhsPKey); return (ret); } } }; int len = allTax.size(); ICFAccTaxObj arr[] = new ICFAccTaxObj[len]; Iterator<ICFAccTaxObj> valIter = allTax.values().iterator(); int idx = 0; while ((idx < len) && valIter.hasNext()) { arr[idx++] = valIter.next(); } if (idx < len) { throw CFLib.getDefaultExceptionFactory() .newArgumentUnderflowException(getClass(), S_ProcName, 0, "idx", idx, len); } else if (valIter.hasNext()) { throw CFLib.getDefaultExceptionFactory() .newArgumentOverflowException(getClass(), S_ProcName, 0, "idx", idx, len); } Arrays.sort(arr, cmp); ArrayList<ICFAccTaxObj> arrayList = new ArrayList<ICFAccTaxObj>(len); for (idx = 0; idx < len; idx++) { arrayList.add(arr[idx]); } List<ICFAccTaxObj> sortedList = arrayList; return (sortedList); }
public void forgetSecGroupIncludeByIncludeIdx(long ClusterId, int IncludeGroupId) { if (indexByIncludeIdx == null) { return; } CFSecuritySecGroupIncludeByIncludeIdxKey key = ((ICFInternetSchema) schema.getBackingStore()) .getFactorySecGroupInclude() .newIncludeIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredIncludeGroupId(IncludeGroupId); if (indexByIncludeIdx.containsKey(key)) { Map<CFSecuritySecGroupIncludePKey, ICFSecuritySecGroupIncludeObj> mapIncludeIdx = indexByIncludeIdx.get(key); if (mapIncludeIdx != null) { List<ICFSecuritySecGroupIncludeObj> toForget = new LinkedList<ICFSecuritySecGroupIncludeObj>(); ICFSecuritySecGroupIncludeObj cur = null; Iterator<ICFSecuritySecGroupIncludeObj> iter = mapIncludeIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByIncludeIdx.remove(key); } }
private void setupDefaultConverters() throws XavaException { Iterator it = propertyMappings.values().iterator(); while (it.hasNext()) { PropertyMapping propertyMapping = (PropertyMapping) it.next(); propertyMapping.setDefaultConverter(); } }
public void deleteSecDeviceByUserIdx(UUID SecUserId) { CFSecuritySecDeviceByUserIdxKey key = ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey(); key.setRequiredSecUserId(SecUserId); if (indexByUserIdx == null) { indexByUserIdx = new HashMap< CFSecuritySecDeviceByUserIdxKey, Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj>>(); } if (indexByUserIdx.containsKey(key)) { Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> dict = indexByUserIdx.get(key); ((ICFSecuritySchema) schema.getBackingStore()) .getTableSecDevice() .deleteSecDeviceByUserIdx(schema.getAuthorization(), SecUserId); Iterator<ICFSecuritySecDeviceObj> iter = dict.values().iterator(); ICFSecuritySecDeviceObj obj; List<ICFSecuritySecDeviceObj> toForget = new LinkedList<ICFSecuritySecDeviceObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByUserIdx.remove(key); } else { ((ICFSecuritySchema) schema.getBackingStore()) .getTableSecDevice() .deleteSecDeviceByUserIdx(schema.getAuthorization(), SecUserId); } }
public void forgetISOCountryCurrencyByCurrencyIdx(short ISOCurrencyId) { if (indexByCurrencyIdx == null) { return; } CFSecurityISOCountryCurrencyByCurrencyIdxKey key = ((ICFInternetSchema) schema.getBackingStore()) .getFactoryISOCountryCurrency() .newCurrencyIdxKey(); key.setRequiredISOCurrencyId(ISOCurrencyId); if (indexByCurrencyIdx.containsKey(key)) { Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> mapCurrencyIdx = indexByCurrencyIdx.get(key); if (mapCurrencyIdx != null) { List<ICFSecurityISOCountryCurrencyObj> toForget = new LinkedList<ICFSecurityISOCountryCurrencyObj>(); ICFSecurityISOCountryCurrencyObj cur = null; Iterator<ICFSecurityISOCountryCurrencyObj> iter = mapCurrencyIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByCurrencyIdx.remove(key); } }
public void forgetSecDeviceByUserIdx(UUID SecUserId) { if (indexByUserIdx == null) { return; } CFSecuritySecDeviceByUserIdxKey key = ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey(); key.setRequiredSecUserId(SecUserId); if (indexByUserIdx.containsKey(key)) { Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> mapUserIdx = indexByUserIdx.get(key); if (mapUserIdx != null) { List<ICFSecuritySecDeviceObj> toForget = new LinkedList<ICFSecuritySecDeviceObj>(); ICFSecuritySecDeviceObj cur = null; Iterator<ICFSecuritySecDeviceObj> iter = mapUserIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByUserIdx.remove(key); } }
public CFSecurityTSecGroupMemberBuff[] readDerivedByGroupIdx( CFSecurityAuthorization Authorization, long TenantId, int TSecGroupId) { final String S_ProcName = "CFSecurityRamTSecGroupMember.readDerivedByGroupIdx"; CFSecurityTSecGroupMemberByGroupIdxKey key = schema.getFactoryTSecGroupMember().newGroupIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); CFSecurityTSecGroupMemberBuff[] recArray; if (dictByGroupIdx.containsKey(key)) { Map<CFSecurityTSecGroupMemberPKey, CFSecurityTSecGroupMemberBuff> subdictGroupIdx = dictByGroupIdx.get(key); recArray = new CFSecurityTSecGroupMemberBuff[subdictGroupIdx.size()]; Iterator<CFSecurityTSecGroupMemberBuff> iter = subdictGroupIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFSecurityTSecGroupMemberPKey, CFSecurityTSecGroupMemberBuff> subdictGroupIdx = new HashMap<CFSecurityTSecGroupMemberPKey, CFSecurityTSecGroupMemberBuff>(); dictByGroupIdx.put(key, subdictGroupIdx); recArray = new CFSecurityTSecGroupMemberBuff[0]; } return (recArray); }
public void forgetTaxByTenantIdx(long TenantId) { if (indexByTenantIdx == null) { return; } CFAccTaxByTenantIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newTenantIdxKey(); key.setRequiredTenantId(TenantId); if (indexByTenantIdx.containsKey(key)) { Map<CFAccTaxPKey, ICFAccTaxObj> mapTenantIdx = indexByTenantIdx.get(key); if (mapTenantIdx != null) { List<ICFAccTaxObj> toForget = new LinkedList<ICFAccTaxObj>(); ICFAccTaxObj cur = null; Iterator<ICFAccTaxObj> iter = mapTenantIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByTenantIdx.remove(key); } }
public CFGenKbISOCountryCurrencyBuff[] readDerivedByCurrencyIdx( CFGenKbAuthorization Authorization, short ISOCurrencyId) { final String S_ProcName = "CFGenKbRamISOCountryCurrency.readDerivedByCurrencyIdx() "; CFGenKbISOCountryCurrencyByCurrencyIdxKey key = schema.getFactoryISOCountryCurrency().newCurrencyIdxKey(); key.setRequiredISOCurrencyId(ISOCurrencyId); CFGenKbISOCountryCurrencyBuff[] recArray; if (dictByCurrencyIdx.containsKey(key)) { Map<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff> subdictCurrencyIdx = dictByCurrencyIdx.get(key); recArray = new CFGenKbISOCountryCurrencyBuff[subdictCurrencyIdx.size()]; Iterator<CFGenKbISOCountryCurrencyBuff> iter = subdictCurrencyIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff> subdictCurrencyIdx = new HashMap<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff>(); dictByCurrencyIdx.put(key, subdictCurrencyIdx); recArray = new CFGenKbISOCountryCurrencyBuff[0]; } return (recArray); }
private PropertyMapping getMappingForColumn(String column) throws XavaException { if (propertyMappings == null) { throw new ElementNotFoundException("mapping_not_found_no_property_mappings", column); } Iterator it = propertyMappings.values().iterator(); while (it.hasNext()) { PropertyMapping propertyMapping = (PropertyMapping) it.next(); if (propertyMapping.getColumn().equalsIgnoreCase(column)) { return propertyMapping; } } throw new ElementNotFoundException("mapping_for_column_not_found", column); }
public CFSecurityCursor openFeeCursorByTenantIdx( CFSecurityAuthorization Authorization, long TenantId) { CFSecurityCursor cursor; CFAccFeeByTenantIdxKey key = schema.getFactoryFee().newTenantIdxKey(); key.setRequiredTenantId(TenantId); if (dictByTenantIdx.containsKey(key)) { Map<CFAccFeePKey, CFAccFeeBuff> subdictTenantIdx = dictByTenantIdx.get(key); cursor = new CFAccRamFeeCursor(Authorization, schema, subdictTenantIdx.values()); } else { cursor = new CFAccRamFeeCursor(Authorization, schema, new ArrayList<CFAccFeeBuff>()); } return (cursor); }
/** @throws XavaException If it does not have a overlapped property, or any other problem. */ public String getOverlappingPropertyForReference(String reference, String propertyOfReference) throws XavaException { String column = getReferenceMapping(reference).getColumnForReferencedModelProperty(propertyOfReference); if (propertyMappings == null) { throw new XavaException("reference_property_not_overlapped", propertyOfReference, reference); } Iterator it = propertyMappings.values().iterator(); while (it.hasNext()) { PropertyMapping mapping = (PropertyMapping) it.next(); if (column.equalsIgnoreCase(mapping.getColumn())) return mapping.getProperty(); } throw new XavaException("reference_property_not_overlapped", propertyOfReference, reference); }
public CFSecurityCursor openServiceCursorByTypeIdx( CFSecurityAuthorization Authorization, int ServiceTypeId) { CFSecurityCursor cursor; CFSecurityServiceByTypeIdxKey key = schema.getFactoryService().newTypeIdxKey(); key.setRequiredServiceTypeId(ServiceTypeId); if (dictByTypeIdx.containsKey(key)) { Map<CFSecurityServicePKey, CFSecurityServiceBuff> subdictTypeIdx = dictByTypeIdx.get(key); cursor = new CFBamRamServiceCursor(Authorization, schema, subdictTypeIdx.values()); } else { cursor = new CFBamRamServiceCursor(Authorization, schema, new ArrayList<CFSecurityServiceBuff>()); } return (cursor); }
private static TopologyStats saveTopologyData(Customer cust, TopologyData3 td, Connection c) throws SQLException { normalizeTopolgyData(td); int sourceID = getSourceID(cust, td.getSourceName(), c); // first, create all the sites and build a map to determine the IDs for servers ExchSite3[] adminGroups = td.getAdminGroups(); Map adminGroupIDs = saveSites(adminGroups, CustomerGroup.TYPE_ADMIN, sourceID, c); int adminCount = adminGroups.length; ExchSite3[] routingGroups = td.getRoutingGroups(); Map routingGroupIDs = saveSites(routingGroups, CustomerGroup.TYPE_ROUTING, sourceID, c); int routingCount = routingGroups.length; // next, create all the servers Map serverIDs = saveServers(td, sourceID, adminGroupIDs, routingGroupIDs, c); int serverCount = serverIDs.size(); // create all the stores Map storeIDs = saveStores(td, sourceID, td.getAdminGroups(), serverIDs, c); int storeCount = storeIDs.size(); // finally, do any necessary deletes Set groupIDs = new HashSet((adminGroupIDs.size() + routingGroupIDs.size()) * 2 + 1); groupIDs.addAll(adminGroupIDs.values()); groupIDs.addAll(routingGroupIDs.values()); deleteTopologyData(c, sourceID, groupIDs, serverIDs.values(), storeIDs.values()); TopologyStats ts = new TopologyStats(); ts.setAdminGroupCount(adminCount); ts.setRoutingGroupCount(routingCount); ts.setServerCount(serverCount); ts.setStoreCount(storeCount); return ts; }
public void deleteDelSubDep3ByIdIdx(CFBamAuthorization Authorization, CFBamScopePKey argKey) { CFBamDelSubDep3Buff cur; LinkedList<CFBamDelSubDep3Buff> matchSet = new LinkedList<CFBamDelSubDep3Buff>(); Iterator<CFBamDelSubDep3Buff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFBamDelSubDep3Buff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteDelSubDep3(Authorization, cur); } }
public CFSecurityCursor openServiceCursorByHostIdx( CFSecurityAuthorization Authorization, long ClusterId, long HostNodeId) { CFSecurityCursor cursor; CFSecurityServiceByHostIdxKey key = schema.getFactoryService().newHostIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredHostNodeId(HostNodeId); if (dictByHostIdx.containsKey(key)) { Map<CFSecurityServicePKey, CFSecurityServiceBuff> subdictHostIdx = dictByHostIdx.get(key); cursor = new CFBamRamServiceCursor(Authorization, schema, subdictHostIdx.values()); } else { cursor = new CFBamRamServiceCursor(Authorization, schema, new ArrayList<CFSecurityServiceBuff>()); } return (cursor); }
public static String getConnectionURL4XADataSource(Config config) throws XMLStreamException { String connectionURL = null; String connectionProperty = config.getProperty(DBConstants.RDBMS.DATASOURCE_PROPS); if (connectionProperty != null) { OMElement payload = AXIOMUtil.stringToOM(connectionProperty); Map<String, String> properties = extractProperties(payload); Collection<String> propValues = properties.values(); for (String propValue : propValues) { if (propValue.startsWith("jdbc:")) { connectionURL = propValue; break; } } } return connectionURL; }
public void deleteFeeByIdIdx(CFSecurityAuthorization Authorization, CFAccFeePKey argKey) { CFAccFeeBuff cur; LinkedList<CFAccFeeBuff> matchSet = new LinkedList<CFAccFeeBuff>(); Iterator<CFAccFeeBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFAccFeeBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteFee(Authorization, cur); } }
public void minimizeMemory() { allSecDevice = null; indexByUserIdx = null; List<ICFSecuritySecDeviceObj> toForget = new LinkedList<ICFSecuritySecDeviceObj>(); ICFSecuritySecDeviceObj cur = null; Iterator<ICFSecuritySecDeviceObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }
public void minimizeMemory() { allTax = null; indexByTenantIdx = null; indexByUNameIdx = null; List<ICFAccTaxObj> toForget = new LinkedList<ICFAccTaxObj>(); ICFAccTaxObj cur = null; Iterator<ICFAccTaxObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }