public void setSwingDataCollection(Collection<ICFSecurityISOCountryObj> value) { final String S_ProcName = "setSwingDataCollection"; swingDataCollection = value; if (swingDataCollection == null) { arrayOfISOCountry = new ICFSecurityISOCountryObj[0]; } else { int len = value.size(); arrayOfISOCountry = new ICFSecurityISOCountryObj[len]; Iterator<ICFSecurityISOCountryObj> iter = swingDataCollection.iterator(); int idx = 0; while (iter.hasNext() && (idx < len)) { arrayOfISOCountry[idx++] = iter.next(); } if (idx < len) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator did not fully populate the array copy"); } if (iter.hasNext()) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator had left over items when done populating array copy"); } Arrays.sort(arrayOfISOCountry, compareISOCountryByQualName); } PickerTableModel tblDataModel = getDataModel(); if (tblDataModel != null) { tblDataModel.fireTableDataChanged(); } }
public CFSecuritySecDeviceBuff[] readBuffByUserIdx( CFSecurityAuthorization Authorization, UUID SecUserId) { final String S_ProcName = "readBuffByUserIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_read_secdev_by_useridx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadBuffByUserIdx == null) { stmtReadBuffByUserIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadBuffByUserIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUserIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUserIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUserIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUserIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByUserIdx.setString(argIdx++, SecUserId.toString()); try { resultSet = stmtReadBuffByUserIdx.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } List<CFSecuritySecDeviceBuff> buffList = new LinkedList<CFSecuritySecDeviceBuff>(); while ((resultSet != null) && resultSet.next()) { CFSecuritySecDeviceBuff buff = unpackSecDeviceResultSetToBuff(resultSet); buffList.add(buff); } int idx = 0; CFSecuritySecDeviceBuff[] retBuff = new CFSecuritySecDeviceBuff[buffList.size()]; Iterator<CFSecuritySecDeviceBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public void deleteMemoByMemoContactIdx(long TenantId, long ContactId) { CFCrmMemoByMemoContactIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newMemoContactIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContactId(ContactId); if (indexByMemoContactIdx == null) { indexByMemoContactIdx = new HashMap<CFCrmMemoByMemoContactIdxKey, Map<CFCrmMemoPKey, ICFCrmMemoObj>>(); } if (indexByMemoContactIdx.containsKey(key)) { Map<CFCrmMemoPKey, ICFCrmMemoObj> dict = indexByMemoContactIdx.get(key); ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .deleteMemoByMemoContactIdx(schema.getAuthorization(), TenantId, ContactId); Iterator<ICFCrmMemoObj> iter = dict.values().iterator(); ICFCrmMemoObj obj; List<ICFCrmMemoObj> toForget = new LinkedList<ICFCrmMemoObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByMemoContactIdx.remove(key); } else { ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .deleteMemoByMemoContactIdx(schema.getAuthorization(), TenantId, ContactId); } }
public void forgetTSecGroupMemberByUserIdx(UUID SecUserId) { if (indexByUserIdx == null) { return; } CFSecurityTSecGroupMemberByUserIdxKey key = ((ICFBamSchema) 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 ListIterator<ICFLibAnyObj> enumerateDetails(MssCFGenContext genContext) { final String S_ProcName = "CFBamMssCFIterateNumberTypeRef.enumerateDetails() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "genContext"); } ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "genContext.getGenDef()"); } List<ICFLibAnyObj> list = new LinkedList<ICFLibAnyObj>(); if (genDef instanceof ICFBamNumberTypeObj) { Iterator<ICFBamTableColObj> elements = ((ICFBamNumberTypeObj) genDef).getOptionalChildrenRef().iterator(); while (elements.hasNext()) { list.add(elements.next()); } } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFBamNumberTypeObj"); } return (list.listIterator()); }
public void forgetMemoByMemoContactIdx(long TenantId, long ContactId) { if (indexByMemoContactIdx == null) { return; } CFCrmMemoByMemoContactIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newMemoContactIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContactId(ContactId); if (indexByMemoContactIdx.containsKey(key)) { Map<CFCrmMemoPKey, ICFCrmMemoObj> mapMemoContactIdx = indexByMemoContactIdx.get(key); if (mapMemoContactIdx != null) { List<ICFCrmMemoObj> toForget = new LinkedList<ICFCrmMemoObj>(); ICFCrmMemoObj cur = null; Iterator<ICFCrmMemoObj> iter = mapMemoContactIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByMemoContactIdx.remove(key); } }
public List<ICFCrmMemoObj> readAllMemo(boolean forceRead) { final String S_ProcName = "readAllMemo"; if ((allMemo == null) || forceRead) { Map<CFCrmMemoPKey, ICFCrmMemoObj> map = new HashMap<CFCrmMemoPKey, ICFCrmMemoObj>(); allMemo = map; CFCrmMemoBuff[] buffList = ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .readAllDerived(schema.getAuthorization()); CFCrmMemoBuff buff; ICFCrmMemoObj obj; for (int idx = 0; idx < buffList.length; idx++) { buff = buffList[idx]; obj = newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newPKey()); obj.setBuff(buff); ICFCrmMemoObj realized = (ICFCrmMemoObj) obj.realize(); } } Comparator<ICFCrmMemoObj> cmp = new Comparator<ICFCrmMemoObj>() { public int compare(ICFCrmMemoObj lhs, ICFCrmMemoObj rhs) { if (lhs == null) { if (rhs == null) { return (0); } else { return (-1); } } else if (rhs == null) { return (1); } else { CFCrmMemoPKey lhsPKey = lhs.getPKey(); CFCrmMemoPKey rhsPKey = rhs.getPKey(); int ret = lhsPKey.compareTo(rhsPKey); return (ret); } } }; int len = allMemo.size(); ICFCrmMemoObj arr[] = new ICFCrmMemoObj[len]; Iterator<ICFCrmMemoObj> valIter = allMemo.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<ICFCrmMemoObj> arrayList = new ArrayList<ICFCrmMemoObj>(len); for (idx = 0; idx < len; idx++) { arrayList.add(arr[idx]); } List<ICFCrmMemoObj> sortedList = arrayList; return (sortedList); }
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 deleteClearTopDepByTenantIdx(long TenantId) { CFBamScopeByTenantIdxKey key = schema.getBackingStore().getFactoryScope().newTenantIdxKey(); key.setRequiredTenantId(TenantId); if (indexByTenantIdx == null) { indexByTenantIdx = new HashMap<CFBamScopeByTenantIdxKey, Map<CFBamScopePKey, ICFBamClearTopDepObj>>(); } if (indexByTenantIdx.containsKey(key)) { Map<CFBamScopePKey, ICFBamClearTopDepObj> dict = indexByTenantIdx.get(key); schema .getBackingStore() .getTableClearTopDep() .deleteClearTopDepByTenantIdx(schema.getAuthorization(), TenantId); 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); } indexByTenantIdx.remove(key); } else { schema .getBackingStore() .getTableClearTopDep() .deleteClearTopDepByTenantIdx(schema.getAuthorization(), TenantId); } }
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 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 ListIterator<ICFLibAnyObj> enumerateDetails(MssCFGenContext genContext) { final String S_ProcName = "CFAsteriskMssCFIterateHostNodeConfFile.enumerateDetails() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "genContext"); } ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "genContext.getGenDef()"); } List<ICFLibAnyObj> list = new LinkedList<ICFLibAnyObj>(); if (genDef instanceof ICFAsteriskHostNodeObj) { Iterator<ICFAsteriskConfigurationFileObj> elements = ((ICFAsteriskHostNodeObj) genDef).getOptionalComponentsConfFile().iterator(); while (elements.hasNext()) { list.add(elements.next()); } } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFAsteriskHostNodeObj"); } return (list.listIterator()); }
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 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 CFSecurityTSecGroupBuff[] readAllBuff(CFSecurityAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_read_tsecgrp_all( ?, ?, ?, ?, ? )"; if (stmtReadAllBuff == null) { stmtReadAllBuff = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadAllBuff.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); try { resultSet = stmtReadAllBuff.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } List<CFSecurityTSecGroupBuff> buffList = new LinkedList<CFSecurityTSecGroupBuff>(); while ((resultSet != null) && resultSet.next()) { CFSecurityTSecGroupBuff buff = unpackTSecGroupResultSetToBuff(resultSet); buffList.add(buff); } int idx = 0; CFSecurityTSecGroupBuff[] retBuff = new CFSecurityTSecGroupBuff[buffList.size()]; Iterator<CFSecurityTSecGroupBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public CFDbTestNumberDefBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "CFDbTestRamNumberDef.readAllDerived"; CFDbTestNumberDefBuff[] retList = new CFDbTestNumberDefBuff[dictByPKey.values().size()]; Iterator<CFDbTestNumberDefBuff> 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 CFBamISOCountryCurrencyBuff[] readBuffByCurrencyIdx( CFBamAuthorization Authorization, short ISOCurrencyId) { final String S_ProcName = "readBuffByCurrencyIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "SELECT * FROM " + schema.getLowerDbSchemaName() + ".sp_read_iso_cntryccy_by_currencyidx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadBuffByCurrencyIdx == null) { stmtReadBuffByCurrencyIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadBuffByCurrencyIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByCurrencyIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByCurrencyIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByCurrencyIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByCurrencyIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByCurrencyIdx.setShort(argIdx++, ISOCurrencyId); resultSet = stmtReadBuffByCurrencyIdx.executeQuery(); List<CFBamISOCountryCurrencyBuff> buffList = new LinkedList<CFBamISOCountryCurrencyBuff>(); while (resultSet.next()) { CFBamISOCountryCurrencyBuff buff = unpackISOCountryCurrencyResultSetToBuff(resultSet); buffList.add(buff); } int idx = 0; CFBamISOCountryCurrencyBuff[] retBuff = new CFBamISOCountryCurrencyBuff[buffList.size()]; Iterator<CFBamISOCountryCurrencyBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public CFSecurityISOTimezoneBuff[] readBuffByOffsetIdx( CFSecurityAuthorization Authorization, short TZHourOffset, short TZMinOffset) { final String S_ProcName = "readBuffByOffsetIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "{ call sp_read_isotz_by_offsetidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ) }"; if (stmtReadBuffByOffsetIdx == null) { stmtReadBuffByOffsetIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadBuffByOffsetIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByOffsetIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByOffsetIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByOffsetIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByOffsetIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByOffsetIdx.setShort(argIdx++, TZHourOffset); stmtReadBuffByOffsetIdx.setShort(argIdx++, TZMinOffset); resultSet = stmtReadBuffByOffsetIdx.executeQuery(); List<CFSecurityISOTimezoneBuff> buffList = new LinkedList<CFSecurityISOTimezoneBuff>(); if (resultSet != null) { while (resultSet.next()) { CFSecurityISOTimezoneBuff buff = unpackISOTimezoneResultSetToBuff(resultSet); buffList.add(buff); } } int idx = 0; CFSecurityISOTimezoneBuff[] retBuff = new CFSecurityISOTimezoneBuff[buffList.size()]; Iterator<CFSecurityISOTimezoneBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public CFSecuritySecFormBuff[] readBuffBySecAppIdx( CFSecurityAuthorization Authorization, long ClusterId, int SecAppId) { final String S_ProcName = "readBuffBySecAppIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); final String sql = "CALL sp_read_secform_by_secappidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtReadBuffBySecAppIdx == null) { stmtReadBuffBySecAppIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadBuffBySecAppIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffBySecAppIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffBySecAppIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffBySecAppIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffBySecAppIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffBySecAppIdx.setLong(argIdx++, ClusterId); stmtReadBuffBySecAppIdx.setInt(argIdx++, SecAppId); resultSet = stmtReadBuffBySecAppIdx.executeQuery(); List<CFSecuritySecFormBuff> buffList = new LinkedList<CFSecuritySecFormBuff>(); while (resultSet.next()) { CFSecuritySecFormBuff buff = unpackSecFormResultSetToBuff(resultSet); buffList.add(buff); } int idx = 0; CFSecuritySecFormBuff[] retBuff = new CFSecuritySecFormBuff[buffList.size()]; Iterator<CFSecuritySecFormBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public void actionPerformed(ActionEvent e) { ICFDbTestTableObj selectedInstance = getSwingFocusAsTable(); if (selectedInstance != null) { List<ICFDbTestValueObj> retList = selectedInstance.testInstListFuncNoArgs(); StringBuffer buff = new StringBuffer(); if (retList != null) { buff.append("testInstListFuncNoArgs() returned list:\n"); Iterator<ICFDbTestValueObj> iter = retList.iterator(); ICFDbTestValueObj cur; while (iter.hasNext()) { cur = iter.next(); buff.append(cur.getClass().getName() + " named " + cur.getObjName() + "\n"); } } else { buff.append("testInstListFuncNoArgs() returned null\n"); } JOptionPane.showMessageDialog(null, buff.toString()); } }
public void minimizeMemory() { allMemo = null; indexByTenantIdx = null; indexByMemoContactIdx = null; indexByUDescrIdx = null; List<ICFCrmMemoObj> toForget = new LinkedList<ICFCrmMemoObj>(); ICFCrmMemoObj cur = null; Iterator<ICFCrmMemoObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); if (cur.getEdit() == null) { toForget.add(cur); } } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }
public void minimizeMemory() { allISOCountryCurrency = null; indexByCountryIdx = null; indexByCurrencyIdx = null; List<ICFSecurityISOCountryCurrencyObj> toForget = new LinkedList<ICFSecurityISOCountryCurrencyObj>(); ICFSecurityISOCountryCurrencyObj cur = null; Iterator<ICFSecurityISOCountryCurrencyObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); if (cur.getEdit() == null) { toForget.add(cur); } } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }
public void minimizeMemory() { allTSecGroupMember = null; indexByTenantIdx = null; indexByGroupIdx = null; indexByUserIdx = null; indexByUUserIdx = null; List<ICFSecurityTSecGroupMemberObj> toForget = new LinkedList<ICFSecurityTSecGroupMemberObj>(); ICFSecurityTSecGroupMemberObj cur = null; Iterator<ICFSecurityTSecGroupMemberObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); if (cur.getEdit() == null) { toForget.add(cur); } } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }
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 void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFDbTestSchemaObj schemaObj = swingSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } List<ICFDbTestValueObj> retList = schemaObj.getTableTableObj().testClassListFuncNoArgs(); StringBuffer buff = new StringBuffer(); if (retList != null) { buff.append("testClassListFuncNoArgs() returned list:\n"); Iterator<ICFDbTestValueObj> iter = retList.iterator(); ICFDbTestValueObj cur; while (iter.hasNext()) { cur = iter.next(); buff.append(cur.getClass().getName() + " named " + cur.getObjName() + "\n"); } } else { buff.append("testClassListFuncNoArgs() returned null\n"); } JOptionPane.showMessageDialog(null, buff.toString()); }
public void deleteISOCountryCurrencyByCurrencyIdx(short ISOCurrencyId) { CFSecurityISOCountryCurrencyByCurrencyIdxKey key = ((ICFInternetSchema) schema.getBackingStore()) .getFactoryISOCountryCurrency() .newCurrencyIdxKey(); key.setRequiredISOCurrencyId(ISOCurrencyId); if (indexByCurrencyIdx == null) { indexByCurrencyIdx = new HashMap< CFSecurityISOCountryCurrencyByCurrencyIdxKey, Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj>>(); } if (indexByCurrencyIdx.containsKey(key)) { Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> dict = indexByCurrencyIdx.get(key); ((ICFInternetSchema) schema.getBackingStore()) .getTableISOCountryCurrency() .deleteISOCountryCurrencyByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId); Iterator<ICFSecurityISOCountryCurrencyObj> iter = dict.values().iterator(); ICFSecurityISOCountryCurrencyObj obj; List<ICFSecurityISOCountryCurrencyObj> toForget = new LinkedList<ICFSecurityISOCountryCurrencyObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByCurrencyIdx.remove(key); } else { ((ICFInternetSchema) schema.getBackingStore()) .getTableISOCountryCurrency() .deleteISOCountryCurrencyByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId); } }
public void deleteTSecGroupMemberByGroupIdx(long TenantId, int TSecGroupId) { CFSecurityTSecGroupMemberByGroupIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newGroupIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); if (indexByGroupIdx == null) { indexByGroupIdx = new HashMap< CFSecurityTSecGroupMemberByGroupIdxKey, Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj>>(); } if (indexByGroupIdx.containsKey(key)) { Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> dict = indexByGroupIdx.get(key); ((ICFBamSchema) schema.getBackingStore()) .getTableTSecGroupMember() .deleteTSecGroupMemberByGroupIdx(schema.getAuthorization(), TenantId, TSecGroupId); Iterator<ICFSecurityTSecGroupMemberObj> iter = dict.values().iterator(); ICFSecurityTSecGroupMemberObj obj; List<ICFSecurityTSecGroupMemberObj> toForget = new LinkedList<ICFSecurityTSecGroupMemberObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByGroupIdx.remove(key); } else { ((ICFBamSchema) schema.getBackingStore()) .getTableTSecGroupMember() .deleteTSecGroupMemberByGroupIdx(schema.getAuthorization(), TenantId, TSecGroupId); } }
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 void deleteISOCurrencyByCcyNmIdx( CFBamAuthorization Authorization, CFBamISOCurrencyByCcyNmIdxKey argKey) { CFBamISOCurrencyBuff cur; LinkedList<CFBamISOCurrencyBuff> matchSet = new LinkedList<CFBamISOCurrencyBuff>(); Iterator<CFBamISOCurrencyBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFBamISOCurrencyBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteISOCurrency(Authorization, cur); } }