public ICFAccTaxObj readTaxByUNameIdx(long TenantId, String Name, boolean forceRead) { if (indexByUNameIdx == null) { indexByUNameIdx = new HashMap<CFAccTaxByUNameIdxKey, ICFAccTaxObj>(); } CFAccTaxByUNameIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newUNameIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredName(Name); ICFAccTaxObj obj = null; if ((!forceRead) && indexByUNameIdx.containsKey(key)) { obj = indexByUNameIdx.get(key); } else { CFAccTaxBuff buff = ((ICFAccSchema) schema.getBackingStore()) .getTableTax() .readDerivedByUNameIdx(schema.getAuthorization(), TenantId, Name); if (buff != null) { obj = schema.getTaxTableObj().newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newPKey()); obj.setBuff(buff); obj = (ICFAccTaxObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUNameIdx.put(key, null); } } return (obj); }
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 deleteSecAppByClusterIdx(long ClusterId) { CFSecuritySecAppByClusterIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); key.setRequiredClusterId(ClusterId); if (indexByClusterIdx == null) { indexByClusterIdx = new HashMap< CFSecuritySecAppByClusterIdxKey, Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj>>(); } if (indexByClusterIdx.containsKey(key)) { Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> dict = indexByClusterIdx.get(key); ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByClusterIdx(schema.getAuthorization(), ClusterId); Iterator<ICFSecuritySecAppObj> iter = dict.values().iterator(); ICFSecuritySecAppObj obj; List<ICFSecuritySecAppObj> toForget = new LinkedList<ICFSecuritySecAppObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByClusterIdx.remove(key); } else { ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByClusterIdx(schema.getAuthorization(), ClusterId); } }
public ICFSecuritySecAppObj readSecAppByUJEEMountIdx( long ClusterId, String JEEMountName, boolean forceRead) { if (indexByUJEEMountIdx == null) { indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>(); } CFSecuritySecAppByUJEEMountIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredJEEMountName(JEEMountName); ICFSecuritySecAppObj obj = null; if ((!forceRead) && indexByUJEEMountIdx.containsKey(key)) { obj = indexByUJEEMountIdx.get(key); } else { CFSecuritySecAppBuff buff = ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .readDerivedByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName); if (buff != null) { obj = schema.getSecAppTableObj().newInstance(); obj.setPKey(((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey()); obj.setBuff(buff); obj = (ICFSecuritySecAppObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUJEEMountIdx.put(key, null); } } return (obj); }
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 void forgetServiceType(ICFSecurityServiceTypeObj Obj, boolean forgetSubObjects) { ICFSecurityServiceTypeObj obj = Obj; CFSecurityServiceTypePKey pkey = obj.getPKey(); if (members.containsKey(pkey)) { ICFSecurityServiceTypeObj keepObj = members.get(pkey); // Detach object from alternate, duplicate, all and PKey indexes if (indexByUDescrIdx != null) { CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription()); indexByUDescrIdx.remove(keyUDescrIdx); } if (allServiceType != null) { allServiceType.remove(keepObj.getPKey()); } members.remove(pkey); if (forgetSubObjects) { ((ICFSecuritySchemaObj) schema) .getServiceTableObj() .forgetServiceByTypeIdx(keepObj.getRequiredServiceTypeId()); } } }
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 ICFSecurityTSecGroupMemberObj readTSecGroupMemberByUUserIdx( long TenantId, int TSecGroupId, UUID SecUserId, boolean forceRead) { if (indexByUUserIdx == null) { indexByUUserIdx = new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>(); } CFSecurityTSecGroupMemberByUUserIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); key.setRequiredSecUserId(SecUserId); ICFSecurityTSecGroupMemberObj obj = null; if ((!forceRead) && indexByUUserIdx.containsKey(key)) { obj = indexByUUserIdx.get(key); } else { CFSecurityTSecGroupMemberBuff buff = ((ICFCrmSchema) schema.getBackingStore()) .getTableTSecGroupMember() .readDerivedByUUserIdx(schema.getAuthorization(), TenantId, TSecGroupId, SecUserId); if (buff != null) { obj = schema.getTSecGroupMemberTableObj().newInstance(); obj.setPKey( ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey()); obj.setBuff(buff); obj = (ICFSecurityTSecGroupMemberObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUUserIdx.put(key, null); } } return (obj); }
public ICFSecurityTSecGroupMemberObj readTSecGroupMember( CFSecurityTSecGroupMemberPKey pkey, boolean forceRead) { ICFSecurityTSecGroupMemberObj obj = null; if ((!forceRead) && members.containsKey(pkey)) { obj = members.get(pkey); } else { CFSecurityTSecGroupMemberBuff readBuff = ((ICFCrmSchema) schema.getBackingStore()) .getTableTSecGroupMember() .readDerivedByIdIdx( schema.getAuthorization(), pkey.getRequiredTenantId(), pkey.getRequiredTSecGroupMemberId()); if (readBuff != null) { obj = schema.getTSecGroupMemberTableObj().newInstance(); obj.setPKey( ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey()); obj.setBuff(readBuff); obj = (ICFSecurityTSecGroupMemberObj) obj.realize(); } else if (schema.getCacheMisses()) { members.put(pkey, null); } } return (obj); }
public void forgetTSecGroupMemberByUserIdx(UUID SecUserId) { if (indexByUserIdx == null) { return; } CFSecurityTSecGroupMemberByUserIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUserIdxKey(); key.setRequiredSecUserId(SecUserId); if (indexByUserIdx.containsKey(key)) { Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> mapUserIdx = indexByUserIdx.get(key); if (mapUserIdx != null) { List<ICFSecurityTSecGroupMemberObj> toForget = new LinkedList<ICFSecurityTSecGroupMemberObj>(); ICFSecurityTSecGroupMemberObj cur = null; Iterator<ICFSecurityTSecGroupMemberObj> 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 void forgetSecAppByClusterIdx(long ClusterId) { if (indexByClusterIdx == null) { return; } CFSecuritySecAppByClusterIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); key.setRequiredClusterId(ClusterId); if (indexByClusterIdx.containsKey(key)) { Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx = indexByClusterIdx.get(key); if (mapClusterIdx != null) { List<ICFSecuritySecAppObj> toForget = new LinkedList<ICFSecuritySecAppObj>(); ICFSecuritySecAppObj cur = null; Iterator<ICFSecuritySecAppObj> iter = mapClusterIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByClusterIdx.remove(key); } }
public void deleteTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) { if (indexByUUserIdx == null) { indexByUUserIdx = new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>(); } CFSecurityTSecGroupMemberByUUserIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); key.setRequiredSecUserId(SecUserId); ICFSecurityTSecGroupMemberObj obj = null; if (indexByUUserIdx.containsKey(key)) { obj = indexByUUserIdx.get(key); ((ICFCrmSchema) schema.getBackingStore()) .getTableTSecGroupMember() .deleteTSecGroupMemberByUUserIdx( schema.getAuthorization(), TenantId, TSecGroupId, SecUserId); obj.forget(true); } else { ((ICFCrmSchema) schema.getBackingStore()) .getTableTSecGroupMember() .deleteTSecGroupMemberByUUserIdx( schema.getAuthorization(), TenantId, TSecGroupId, SecUserId); } }
public ICFSecurityServiceTypeObj readServiceTypeByUDescrIdx( String Description, boolean forceRead) { if (indexByUDescrIdx == null) { indexByUDescrIdx = new HashMap<CFSecurityServiceTypeByUDescrIdxKey, ICFSecurityServiceTypeObj>(); } CFSecurityServiceTypeByUDescrIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); key.setRequiredDescription(Description); ICFSecurityServiceTypeObj obj = null; if ((!forceRead) && indexByUDescrIdx.containsKey(key)) { obj = indexByUDescrIdx.get(key); } else { CFSecurityServiceTypeBuff buff = ((ICFAccSchema) schema.getBackingStore()) .getTableServiceType() .readDerivedByUDescrIdx(schema.getAuthorization(), Description); if (buff != null) { obj = schema.getServiceTypeTableObj().newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey()); obj.setBuff(buff); obj = (ICFSecurityServiceTypeObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUDescrIdx.put(key, null); } } return (obj); }
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 void forgetTaxByIdIdx(long TaxId) { if (members == null) { return; } CFAccTaxPKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newPKey(); key.setRequiredTaxId(TaxId); if (members.containsKey(key)) { ICFAccTaxObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public CFAccFeeBuff lockDerived(CFSecurityAuthorization Authorization, CFAccFeePKey PKey) { final String S_ProcName = "CFAccRamFee.readDerived"; CFAccFeePKey key = schema.getFactoryFee().newPKey(); key.setRequiredTenantId(PKey.getRequiredTenantId()); key.setRequiredFeeId(PKey.getRequiredFeeId()); CFAccFeeBuff buff; if (dictByPKey.containsKey(key)) { buff = dictByPKey.get(key); } else { buff = null; } return (buff); }
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); }
public void forgetServiceTypeByIdIdx(int ServiceTypeId) { if (members == null) { return; } CFSecurityServiceTypePKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey(); key.setRequiredServiceTypeId(ServiceTypeId); if (members.containsKey(key)) { ICFSecurityServiceTypeObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public void forgetTSecGroupMemberByIdIdx(long TenantId, long TSecGroupMemberId) { if (members == null) { return; } CFSecurityTSecGroupMemberPKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupMemberId(TSecGroupMemberId); if (members.containsKey(key)) { ICFSecurityTSecGroupMemberObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public void forgetSecAppByIdIdx(long ClusterId, int SecAppId) { if (members == null) { return; } CFSecuritySecAppPKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey(); key.setRequiredClusterId(ClusterId); key.setRequiredSecAppId(SecAppId); if (members.containsKey(key)) { ICFSecuritySecAppObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public void forgetServiceTypeByUDescrIdx(String Description) { if (indexByUDescrIdx == null) { return; } CFSecurityServiceTypeByUDescrIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); key.setRequiredDescription(Description); if (indexByUDescrIdx.containsKey(key)) { ICFSecurityServiceTypeObj probed = indexByUDescrIdx.get(key); if (probed != null) { probed.forget(true); } indexByUDescrIdx.remove(key); } }
public void forgetSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) { if (indexByUJEEMountIdx == null) { return; } CFSecuritySecAppByUJEEMountIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredJEEMountName(JEEMountName); if (indexByUJEEMountIdx.containsKey(key)) { ICFSecuritySecAppObj probed = indexByUJEEMountIdx.get(key); if (probed != null) { probed.forget(true); } indexByUJEEMountIdx.remove(key); } }
public void forgetTaxByUNameIdx(long TenantId, String Name) { if (indexByUNameIdx == null) { return; } CFAccTaxByUNameIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newUNameIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredName(Name); if (indexByUNameIdx.containsKey(key)) { ICFAccTaxObj probed = indexByUNameIdx.get(key); if (probed != null) { probed.forget(true); } indexByUNameIdx.remove(key); } }
public void forgetTax(ICFAccTaxObj Obj, boolean forgetSubObjects) { ICFAccTaxObj obj = Obj; CFAccTaxPKey pkey = obj.getPKey(); if (members.containsKey(pkey)) { ICFAccTaxObj keepObj = members.get(pkey); // Detach object from alternate, duplicate, all and PKey indexes if (indexByTenantIdx != null) { CFAccTaxByTenantIdxKey keyTenantIdx = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(keepObj.getRequiredTenantId()); Map<CFAccTaxPKey, ICFAccTaxObj> mapTenantIdx = indexByTenantIdx.get(keyTenantIdx); if (mapTenantIdx != null) { mapTenantIdx.remove(keepObj.getPKey()); } } if (indexByUNameIdx != null) { CFAccTaxByUNameIdxKey keyUNameIdx = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newUNameIdxKey(); keyUNameIdx.setRequiredTenantId(keepObj.getRequiredTenantId()); keyUNameIdx.setRequiredName(keepObj.getRequiredName()); indexByUNameIdx.remove(keyUNameIdx); } if (allTax != null) { allTax.remove(keepObj.getPKey()); } members.remove(pkey); if (forgetSubObjects) {} } }
public void forgetTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) { if (indexByUUserIdx == null) { return; } CFSecurityTSecGroupMemberByUUserIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); key.setRequiredSecUserId(SecUserId); if (indexByUUserIdx.containsKey(key)) { ICFSecurityTSecGroupMemberObj probed = indexByUUserIdx.get(key); if (probed != null) { probed.forget(true); } indexByUUserIdx.remove(key); } }
public ICFSecurityServiceTypeObj realizeServiceType(ICFSecurityServiceTypeObj Obj) { ICFSecurityServiceTypeObj obj = Obj; CFSecurityServiceTypePKey pkey = obj.getPKey(); ICFSecurityServiceTypeObj keepObj = null; if (members.containsKey(pkey) && (null != members.get(pkey))) { ICFSecurityServiceTypeObj existingObj = members.get(pkey); keepObj = existingObj; /* * We always rebind the data because if we're being called, some index has * been updated and is refreshing it's data, which may or may not have changed */ // Detach object from alternate and duplicate indexes, leave PKey alone if (indexByUDescrIdx != null) { CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription()); indexByUDescrIdx.remove(keyUDescrIdx); } keepObj.setBuff(Obj.getBuff()); // Attach new object to alternate and duplicate indexes -- PKey stay stable if (indexByUDescrIdx != null) { CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription()); indexByUDescrIdx.put(keyUDescrIdx, keepObj); } if (allServiceType != null) { allServiceType.put(keepObj.getPKey(), keepObj); } } else { keepObj = obj; keepObj.setIsNew(false); // Attach new object to PKey, all, alternate, and duplicate indexes members.put(keepObj.getPKey(), keepObj); if (allServiceType != null) { allServiceType.put(keepObj.getPKey(), keepObj); } if (indexByUDescrIdx != null) { CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription()); indexByUDescrIdx.put(keyUDescrIdx, keepObj); } } return (keepObj); }
public void deleteTaxByUNameIdx(long TenantId, String Name) { if (indexByUNameIdx == null) { indexByUNameIdx = new HashMap<CFAccTaxByUNameIdxKey, ICFAccTaxObj>(); } CFAccTaxByUNameIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newUNameIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredName(Name); ICFAccTaxObj obj = null; if (indexByUNameIdx.containsKey(key)) { obj = indexByUNameIdx.get(key); ((ICFAccSchema) schema.getBackingStore()) .getTableTax() .deleteTaxByUNameIdx(schema.getAuthorization(), TenantId, Name); obj.forget(true); } else { ((ICFAccSchema) schema.getBackingStore()) .getTableTax() .deleteTaxByUNameIdx(schema.getAuthorization(), TenantId, Name); } }
public void deleteSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) { if (indexByUJEEMountIdx == null) { indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>(); } CFSecuritySecAppByUJEEMountIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredJEEMountName(JEEMountName); ICFSecuritySecAppObj obj = null; if (indexByUJEEMountIdx.containsKey(key)) { obj = indexByUJEEMountIdx.get(key); ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName); obj.forget(true); } else { ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName); } }
public ICFSecurityServiceTypeObj readServiceType( CFSecurityServiceTypePKey pkey, boolean forceRead) { ICFSecurityServiceTypeObj obj = null; if ((!forceRead) && members.containsKey(pkey)) { obj = members.get(pkey); } else { CFSecurityServiceTypeBuff readBuff = ((ICFAccSchema) schema.getBackingStore()) .getTableServiceType() .readDerivedByIdIdx(schema.getAuthorization(), pkey.getRequiredServiceTypeId()); if (readBuff != null) { obj = schema.getServiceTypeTableObj().newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey()); obj.setBuff(readBuff); obj = (ICFSecurityServiceTypeObj) obj.realize(); } else if (schema.getCacheMisses()) { members.put(pkey, null); } } return (obj); }
public void deleteServiceTypeByUDescrIdx(String Description) { if (indexByUDescrIdx == null) { indexByUDescrIdx = new HashMap<CFSecurityServiceTypeByUDescrIdxKey, ICFSecurityServiceTypeObj>(); } CFSecurityServiceTypeByUDescrIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey(); key.setRequiredDescription(Description); ICFSecurityServiceTypeObj obj = null; if (indexByUDescrIdx.containsKey(key)) { obj = indexByUDescrIdx.get(key); ((ICFAccSchema) schema.getBackingStore()) .getTableServiceType() .deleteServiceTypeByUDescrIdx(schema.getAuthorization(), Description); obj.forget(true); } else { ((ICFAccSchema) schema.getBackingStore()) .getTableServiceType() .deleteServiceTypeByUDescrIdx(schema.getAuthorization(), Description); } }