public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFBindISOCountryCurrencyISOCountryId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext"); } ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAccISOCountryCurrencyObj) { short iSOCountryId = ((ICFAccISOCountryCurrencyObj) genDef).getRequiredISOCountryId(); ret = Short.toString(iSOCountryId); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAccISOCountryCurrencyObj"); } return (ret); }
public CFAccJavaFXInvoiceViewEditPane( ICFFormManager formManager, ICFAccJavaFXSchema argSchema, ICFAccInvoiceObj argFocus) { super(); final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocus(argFocus); attrPane = argSchema.getInvoiceFactory().newAttrPane(cfFormManager, argFocus); attrScrollPane = new ScrollPane(); attrScrollPane.setFitToWidth(true); attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); attrScrollPane.setContent(attrPane); eltTabPane = argSchema.getInvoiceFactory().newEltTabPane(cfFormManager, argFocus); setOrientation(Orientation.VERTICAL); getItems().add(attrScrollPane); getItems().add(eltTabPane); }
public ListIterator<ICFLibAnyObj> enumerateDetails(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFIterateClusterSecApp.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 ICFAccClusterObj) { Iterator<ICFSecuritySecAppObj> elements = ((ICFAccClusterObj) genDef).getOptionalComponentsSecApp().iterator(); while (elements.hasNext()) { list.add(elements.next()); } } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFAccClusterObj"); } return (list.listIterator()); }
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFBindAccountChequeNumDigits.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext"); } ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAccAccountObj) { short chequeNumDigits = ((ICFAccAccountObj) genDef).getRequiredChequeNumDigits(); ret = Short.toString(chequeNumDigits); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAccAccountObj"); } return (ret); }
public Object getValueObject(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFBindFeeDetailFeeId.getValueObject() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext"); } ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } long feeId; if (genDef instanceof ICFAccFeeDetailObj) { feeId = ((ICFAccFeeDetailObj) genDef).getRequiredFeeId(); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAccFeeDetailObj"); } return (feeId); }
public ICFLibAnyObj dereference(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFReferenceContactURLTenant.dereference() "; 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()"); } ICFAccTenantObj obj; if (genDef instanceof ICFAccContactURLObj) { obj = (ICFAccTenantObj) ((ICFAccContactURLObj) genDef).getRequiredOwnerTenant(); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFAccContactURLObj"); } return (obj); }
public ICFLibAnyObj dereference(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFReferenceMemoMemoData.dereference() "; 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()"); } ICFAccMemoDataObj obj; if (genDef instanceof ICFAccMemoObj) { obj = (ICFAccMemoDataObj) ((ICFAccMemoObj) genDef).getOptionalComponentsMemoData(); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFAccMemoObj"); } return (obj); }
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFBindVendorUnitTenantId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext"); } ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAccVendorUnitObj) { long tenantId = ((ICFAccVendorUnitObj) genDef).getRequiredTenantId(); ret = Long.toString(tenantId); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAccVendorUnitObj"); } return (ret); }
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 deleteFeeDetailByFeeIdx( CFSecurityAuthorization Authorization, long TenantId, long FeeId) { final String S_ProcName = "deleteFeeDetailByFeeIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "exec sp_delete_feedtl_by_feeidx ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?"; if (stmtDeleteByFeeIdx == null) { stmtDeleteByFeeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByFeeIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByFeeIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByFeeIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByFeeIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByFeeIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByFeeIdx.setLong(argIdx++, TenantId); stmtDeleteByFeeIdx.setLong(argIdx++, FeeId); Object stuff = null; boolean moreResults = stmtDeleteByFeeIdx.execute(); while (stuff == null) { try { moreResults = stmtDeleteByFeeIdx.getMoreResults(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } if (moreResults) { try { stuff = stmtDeleteByFeeIdx.getResultSet(); } catch (SQLException e) { } } else if (-1 == stmtDeleteByFeeIdx.getUpdateCount()) { break; } } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public CFAccFeeDetailBuff lockBuff( CFSecurityAuthorization Authorization, CFAccFeeDetailPKey PKey) { final String S_ProcName = "lockBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); long TenantId = PKey.getRequiredTenantId(); long FeeDetailId = PKey.getRequiredFeeDetailId(); String sql = "exec sp_lock_feedtl ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?"; if (stmtLockBuffByPKey == null) { stmtLockBuffByPKey = cnx.prepareStatement(sql); } int argIdx = 1; stmtLockBuffByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtLockBuffByPKey.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtLockBuffByPKey.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtLockBuffByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtLockBuffByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtLockBuffByPKey.setLong(argIdx++, TenantId); stmtLockBuffByPKey.setLong(argIdx++, FeeDetailId); resultSet = stmtLockBuffByPKey.executeQuery(); if (resultSet.next()) { CFAccFeeDetailBuff buff = unpackFeeDetailResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public CFAccFeeDetailBuff nextFeeDetailCursor(CFSecurityCursor Cursor) { final String S_ProcName = "nextFeeDetailCursor"; try { ResultSet resultSet = Cursor.getResultSet(); if (!resultSet.next()) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException(getClass(), S_ProcName, "No more results available"); } CFAccFeeDetailBuff buff = unpackFeeDetailResultSetToBuff(resultSet); return (buff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
public CFAccFeeDetailBuff readBuffByIdIdx( CFSecurityAuthorization Authorization, long TenantId, long FeeDetailId) { final String S_ProcName = "readBuffByIdIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "exec sp_read_feedtl_by_ididx ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?"; if (stmtReadBuffByIdIdx == null) { stmtReadBuffByIdIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadBuffByIdIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByIdIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByIdIdx.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByIdIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByIdIdx.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByIdIdx.setLong(argIdx++, TenantId); stmtReadBuffByIdIdx.setLong(argIdx++, FeeDetailId); resultSet = stmtReadBuffByIdIdx.executeQuery(); if (resultSet.next()) { CFAccFeeDetailBuff buff = unpackFeeDetailResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
public CFAccFeeDetailBuff[] 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 = "exec sp_read_feedtl_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()); resultSet = stmtReadAllBuff.executeQuery(); List<CFAccFeeDetailBuff> buffList = new LinkedList<CFAccFeeDetailBuff>(); while (resultSet.next()) { CFAccFeeDetailBuff buff = unpackFeeDetailResultSetToBuff(resultSet); buffList.add(buff); } int idx = 0; CFAccFeeDetailBuff[] retBuff = new CFAccFeeDetailBuff[buffList.size()]; Iterator<CFAccFeeDetailBuff> 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 deleteFeeDetail(CFSecurityAuthorization Authorization, CFAccFeeDetailBuff Buff) { final String S_ProcName = "deleteFeeDetail"; try { Connection cnx = schema.getCnx(); long TenantId = Buff.getRequiredTenantId(); long FeeDetailId = Buff.getRequiredFeeDetailId(); String sql = "exec sp_delete_feedtl ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?"; if (stmtDeleteByPKey == null) { stmtDeleteByPKey = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, FeeDetailId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; Object stuff = null; boolean moreResults = stmtDeleteByPKey.execute(); while (stuff == null) { try { moreResults = stmtDeleteByPKey.getMoreResults(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } if (moreResults) { try { stuff = stmtDeleteByPKey.getResultSet(); } catch (SQLException e) { } } else if (-1 == stmtDeleteByPKey.getUpdateCount()) { break; } } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
public void setCFFormManager(ICFFormManager value) { final String S_ProcName = "setCFFormManager"; if (value == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "value"); } cfFormManager = value; }
public CFAccJavaFXPurchaseOrderFactory(ICFAccJavaFXSchema argSchema) { final String S_ProcName = "construct-schema"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(this.getClass(), S_ProcName, 1, "argSchema"); } javafxSchema = argSchema; }
public void closeFeeDetailCursor(CFSecurityCursor Cursor) { try { Cursor.getResultSet().close(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory() .newDbException(getClass(), "closeFeeDetailCursor", e); } }
public void setJavaFXFocus(ICFLibAnyObj value) { final String S_ProcName = "setJavaFXFocus"; if ((value == null) || (value instanceof ICFAccInvoiceObj)) { super.setJavaFXFocus(value); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException(getClass(), S_ProcName, "value", value, "ICFAccInvoiceObj"); } }
public void reset() { ((CFAccCursor) this).reset(); try { resultSet.close(); resultSet = stmt.executeQuery(sql); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), "reset", e); } }
public CFAccFeeDetailBuff[] readDerivedByFeeIdx( CFSecurityAuthorization Authorization, long TenantId, long FeeId) { final String S_ProcName = "readDerivedByFeeIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } CFAccFeeDetailBuff[] buffList = readBuffByFeeIdx(Authorization, TenantId, FeeId); return (buffList); }
public CFAccFeeDetailBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "readAllDerived"; CFAccFeeDetailBuff[] buffArray; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } buffArray = readAllBuff(Authorization); return (buffArray); }
public CFAccFeeDetailBuff readDerivedByIdIdx( CFSecurityAuthorization Authorization, long TenantId, long FeeDetailId) { final String S_ProcName = "CFAccSybaseFeeDetailTable.readDerivedByIdIdx() "; CFAccFeeDetailBuff buff; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } buff = readBuffByIdIdx(Authorization, TenantId, FeeDetailId); return (buff); }
public CFAccFeeDetailBuff lockDerived( CFSecurityAuthorization Authorization, CFAccFeeDetailPKey PKey) { final String S_ProcName = "lockDerived"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), S_ProcName, "Transaction not open"); } CFAccFeeDetailBuff buff; buff = lockBuff(Authorization, PKey); return (buff); }
public void setBuff(CFCrmAddressBuff value) { if (!((value == null) || (value instanceof CFCrmAddressBuff))) { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException(getClass(), "setBuff", "value", value, "CFCrmAddressBuff"); } buff = value; copyBuffToPKey(); requiredOwnerTenant = null; requiredContainerContact = null; optionalLookupCountry = null; }
public void deleteFee(CFSecurityAuthorization Authorization, CFAccFeeBuff Buff) { final String S_ProcName = "CFAccRamFeeTable.deleteFee() "; CFAccFeePKey pkey = schema.getFactoryFee().newPKey(); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredFeeId(Buff.getRequiredFeeId()); CFAccFeeBuff existing = dictByPKey.get(pkey); if (existing == null) { return; } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory() .newCollisionDetectedException(getClass(), "deleteFee", pkey); } CFAccFeeByDateIdxKey keyDateIdx = schema.getFactoryFee().newDateIdxKey(); keyDateIdx.setRequiredTenantId(existing.getRequiredTenantId()); keyDateIdx.setRequiredAccountId(existing.getRequiredAccountId()); keyDateIdx.setRequiredFeeDate(existing.getRequiredFeeDate()); CFAccFeeByTenantIdxKey keyTenantIdx = schema.getFactoryFee().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); CFAccFeeByAcctIdxKey keyAcctIdx = schema.getFactoryFee().newAcctIdxKey(); keyAcctIdx.setRequiredTenantId(existing.getRequiredTenantId()); keyAcctIdx.setRequiredAccountId(existing.getRequiredAccountId()); CFAccFeeByLedgerIdxKey keyLedgerIdx = schema.getFactoryFee().newLedgerIdxKey(); keyLedgerIdx.setOptionalLedgerTenantId(existing.getOptionalLedgerTenantId()); keyLedgerIdx.setOptionalLedgerId(existing.getOptionalLedgerId()); // Validate reverse foreign keys // Delete is valid schema .getTableFeeDetail() .deleteFeeDetailByFeeIdx( Authorization, Buff.getRequiredTenantId(), Buff.getRequiredFeeId()); Map<CFAccFeePKey, CFAccFeeBuff> subdict; dictByPKey.remove(pkey); subdict = dictByDateIdx.get(keyDateIdx); subdict.remove(pkey); subdict = dictByTenantIdx.get(keyTenantIdx); subdict.remove(pkey); subdict = dictByAcctIdx.get(keyAcctIdx); subdict.remove(pkey); subdict = dictByLedgerIdx.get(keyLedgerIdx); subdict.remove(pkey); }
public void deleteTaxByUNameIdx( CFSecurityAuthorization Authorization, long argTenantId, String argName) { final String S_ProcName = "deleteTaxByUNameIdx"; String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAccXMsgTaxMessageFormatter.formatTaxRqstDeleteByUNameIdx( "\n\t\t\t", argTenantId, argName) + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Server did not respond with a Deleted message"); } }
public CFAccOracleCursor( CFSecurityAuthorization argAuthorization, CFAccSchema argSchema, String argSql) { super(argAuthorization, argSchema, argSql, 0); try { stmt = ((CFAccOracleSchema) schema) .getCnx() .createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); resultSet = stmt.executeQuery(sql); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory() .newDbException(getClass(), "CFAccOracleCursor-constructor", e); } }
public ICFCrmAddressEditObj beginEdit() { if (edit != null) { throw CFLib.getDefaultExceptionFactory() .newUsageException(getClass(), "beginEdit", "An edit is already open"); } ICFCrmAddressObj lockobj; if (getIsNew()) { lockobj = (ICFCrmAddressObj) this; } else { lockobj = ((ICFAccSchemaObj) schema).getAddressTableObj().lockAddress(getPKey()); } edit = ((ICFAccSchemaObj) schema).getAddressTableObj().newEditInstance(lockobj); return ((ICFCrmAddressEditObj) edit); }
public void deleteFeeDetail(CFSecurityAuthorization Authorization, CFAccFeeDetailBuff Buff) { final String S_ProcName = "deleteFeeDetail"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try { long TenantId = Buff.getRequiredTenantId(); long FeeDetailId = Buff.getRequiredFeeDetailId(); stmtDeleteByPKey = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".dl_feedtl( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString( argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong( argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, FeeDetailId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }