com.ibm.commerce.contract.objimpl

Class ContractJDBCHelperBeanBase

    • Field Detail

      • queryContractNameSQL

        public static final java.lang.String queryContractNameSQL
        See Also:
        Constant Field Values
      • findXMLDefByTPCSQL

        public static final java.lang.String findXMLDefByTPCSQL
        See Also:
        Constant Field Values
      • deleteXMLDefByTPCSQL

        public static final java.lang.String deleteXMLDefByTPCSQL
        See Also:
        Constant Field Values
      • findTPCXMLDefForUpdateSQL

        public static final java.lang.String findTPCXMLDefForUpdateSQL
        See Also:
        Constant Field Values
      • updateTPCXMLDefSQL

        public static final java.lang.String updateTPCXMLDefSQL
        See Also:
        Constant Field Values
      • emptyTPCXMLDefSQL

        public static final java.lang.String emptyTPCXMLDefSQL
        See Also:
        Constant Field Values
      • findContractStoreXMLSQL

        public static final java.lang.String findContractStoreXMLSQL
        See Also:
        Constant Field Values
      • updateContractStoreXMLSQL

        public static final java.lang.String updateContractStoreXMLSQL
        See Also:
        Constant Field Values
      • emptyContractStoreXMLSQL

        public static final java.lang.String emptyContractStoreXMLSQL
        See Also:
        Constant Field Values
      • findContractStoreXMLForUpdateSQL

        public static final java.lang.String findContractStoreXMLForUpdateSQL
        See Also:
        Constant Field Values
      • findActiveContractsDeployedInStoreSQL

        public static final java.lang.String findActiveContractsDeployedInStoreSQL
        See Also:
        Constant Field Values
      • findActiveContractsDeployedInStoreSQLForPreview

        public static final java.lang.String findActiveContractsDeployedInStoreSQLForPreview
        See Also:
        Constant Field Values
      • addTCAttributeXMLSQL

        public static final java.lang.String addTCAttributeXMLSQL
        See Also:
        Constant Field Values
      • deleteTCAttributeXMLSQL

        public static final java.lang.String deleteTCAttributeXMLSQL
        See Also:
        Constant Field Values
      • findAllTCAttributeXMLSQL

        public static final java.lang.String findAllTCAttributeXMLSQL
        See Also:
        Constant Field Values
      • updateTCAttributeXMLSQL

        public static final java.lang.String updateTCAttributeXMLSQL
        See Also:
        Constant Field Values
      • emptyTCAttributeXMLSQL

        public static final java.lang.String emptyTCAttributeXMLSQL
        See Also:
        Constant Field Values
      • findTCAttributeXMLForUpdateSQL

        public static final java.lang.String findTCAttributeXMLForUpdateSQL
        See Also:
        Constant Field Values
      • findTCIdInTCAttributeByTradingIdAndTypeSQL

        public static final java.lang.String findTCIdInTCAttributeByTradingIdAndTypeSQL
        See Also:
        Constant Field Values
      • findTCIdInTCAttributeByTradingIdTCIdAndTypeSQL

        public static final java.lang.String findTCIdInTCAttributeByTradingIdTCIdAndTypeSQL
        See Also:
        Constant Field Values
      • findInclusionProductSetIdsByTCIdAndTypeSQL

        public static final java.lang.String findInclusionProductSetIdsByTCIdAndTypeSQL
        See Also:
        Constant Field Values
      • findExclusionProductSetIdsByTCIdAndTypeSQL

        public static final java.lang.String findExclusionProductSetIdsByTCIdAndTypeSQL
        See Also:
        Constant Field Values
      • findStoreIdsInStoreContractByContractIdSQL

        public static final java.lang.String findStoreIdsInStoreContractByContractIdSQL
        See Also:
        Constant Field Values
      • addProductSetAdjustmentSQL

        public static final java.lang.String addProductSetAdjustmentSQL
        See Also:
        Constant Field Values
      • updateProductSetAdjustmentSQL

        public static final java.lang.String updateProductSetAdjustmentSQL
        See Also:
        Constant Field Values
      • deleteProductSetAdjustmentSQL

        public static final java.lang.String deleteProductSetAdjustmentSQL
        See Also:
        Constant Field Values
      • findProductSetIdsByTCIdAndTypeSQL

        public static final java.lang.String findProductSetIdsByTCIdAndTypeSQL
        See Also:
        Constant Field Values
      • findLargestSequenceInTCAttributeSQL

        public static final java.lang.String findLargestSequenceInTCAttributeSQL
        See Also:
        Constant Field Values
      • findSequenceInTCAttributeSQL

        public static final java.lang.String findSequenceInTCAttributeSQL
        See Also:
        Constant Field Values
      • findSameFamilyContractsSQL

        public static final java.lang.String findSameFamilyContractsSQL
        See Also:
        Constant Field Values
      • findProductSetAdjustmentsSQL

        public static final java.lang.String findProductSetAdjustmentsSQL
        See Also:
        Constant Field Values
      • findAccountIdByUserIdStoreIdSQL

        public static final java.lang.String findAccountIdByUserIdStoreIdSQL
        See Also:
        Constant Field Values
      • findAccountIdByUserIdStoreIdByOrganizationSQL

        public static final java.lang.String findAccountIdByUserIdStoreIdByOrganizationSQL
        See Also:
        Constant Field Values
      • findContractCommentsSQL

        public static final java.lang.String findContractCommentsSQL
        See Also:
        Constant Field Values
      • findParticipntInformationSQL

        public static final java.lang.String findParticipntInformationSQL
        See Also:
        Constant Field Values
      • findPolicyDescriptionSQL

        public static final java.lang.String findPolicyDescriptionSQL
        See Also:
        Constant Field Values
      • findTCDescLongDescSQL

        public static final java.lang.String findTCDescLongDescSQL
        See Also:
        Constant Field Values
      • findTRDDescLongDescSQL

        public static final java.lang.String findTRDDescLongDescSQL
        See Also:
        Constant Field Values
      • findTermCondStringField1SQL

        public static final java.lang.String findTermCondStringField1SQL
        See Also:
        Constant Field Values
      • updateContractCommentsSQL

        public static final java.lang.String updateContractCommentsSQL
        See Also:
        Constant Field Values
      • updateParticipntInfoSQL

        public static final java.lang.String updateParticipntInfoSQL
        See Also:
        Constant Field Values
      • updatePolicyDescriptionSQL

        public static final java.lang.String updatePolicyDescriptionSQL
        See Also:
        Constant Field Values
      • updateTCDescLongDescSQL

        public static final java.lang.String updateTCDescLongDescSQL
        See Also:
        Constant Field Values
      • updateTRDDescLongDescSQL

        public static final java.lang.String updateTRDDescLongDescSQL
        See Also:
        Constant Field Values
      • updateTermCondStringField1SQL

        public static final java.lang.String updateTermCondStringField1SQL
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContractJDBCHelperBeanBase

        public ContractJDBCHelperBeanBase()
    • Method Detail

      • addEntryToContractName

        public int addEntryToContractName(java.lang.String argName,
                                          java.lang.Long argMemberId,
                                          java.lang.Integer argOrigin)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException

        Adds an entry to the contract name table.

        The SQL statement used to add a row to the CNTRNAME table is:

        insert into cntrname (name, member_id, origin) values(?, ?, ?)

        Parameters:
        argName - The name of the contract.
        argMemberId - The ID of the owner member.
        argOrigin - The origin of the contract.
        Returns:
        The number of rows in the contract name table after the new row has been inserted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addEntryToContractName

        public int addEntryToContractName(java.lang.String argName,
                                          java.lang.Long argMemberId,
                                          java.lang.Integer argOrigin,
                                          boolean flush)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException

        Adds an entry to the contract name table.

        The SQL statement used to add a row to the CNTRNAME table is:

        insert into cntrname (name, member_id, origin) values(?, ?, ?)

        Parameters:
        argName - The name of the contract.
        argMemberId - The ID of the owner member.
        argOrigin - The origin of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows inserted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addPolicyTC

        public int addPolicyTC(java.lang.Long argPolicyId,
                               java.lang.Long argTCId)
                        throws java.sql.SQLException,
                               javax.naming.NamingException

        Adds an entry to the policy terms and conditions table.

        The SQL statement used to add a row to the POLICYTC table is:

        insert into policytc (policy_id, termcond_id) values(?, ?)

        Parameters:
        argPolicyId - The ID of the policy.
        argTCId - The ID of the terms and conditions.
        Returns:
        The number of rows inserted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addStoreContract

        public int addStoreContract(java.lang.Long argStoreId,
                                    java.lang.Long argContractId)
                             throws java.sql.SQLException,
                                    javax.naming.NamingException

        Adds an entry to the store contract table.

        The SQL statement used to add a row to the STORECNTR table is:

        insert into storecntr (store_id, contract_id) values(?, ?)

        Parameters:
        argStoreId - The ID of the store.
        argContractId - The ID of the contract.
        Returns:
        The number of rows inserted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addTPCXMLDefinition

        public int addTPCXMLDefinition(java.lang.Long argTradingPositionContainerId,
                                       java.util.Vector argXMLDefVec)
                                throws java.sql.SQLException,
                                       javax.naming.NamingException

        Adds an entry to the trading position container XML table.

        The SQL statement used to add a row to the TRDPSCNXML table is:

        insert into trdpscnxml (tradeposcn_id, sequence, xmldefinition) values(?, ?, ?)

        Parameters:
        argTradingPositionContainerId - The ID of the trading position container.
        argXMLDefVec - The XML definition associated with the specified trading position container.
        Returns:
        The number of rows inserted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addTPCXMLDefinition

        public int addTPCXMLDefinition(java.lang.Long argTradingPositionContainerId,
                                       java.util.Vector argXMLDefVec,
                                       boolean flush)
                                throws java.sql.SQLException,
                                       javax.naming.NamingException

        Adds an entry to the trading position container XML table.

        The SQL statement used to add a row to the TRDPSCNXML table is:

        insert into trdpscnxml (tradeposcn_id, sequence, xmldefinition) values(?, ?, ?)

        Parameters:
        argTradingPositionContainerId - The ID of the trading position container.
        argXMLDefVec - The XML definition associated with the specified trading position container.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows inserted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteEntryFromContractName

        public int deleteEntryFromContractName(java.lang.String argName,
                                               java.lang.Long argMemberId,
                                               java.lang.Integer argOrigin)
                                        throws java.sql.SQLException,
                                               javax.naming.NamingException

        Deletes an entry from the contract name table.

        The SQL statement used to delete a row from the CNTRNAME table is:

        delete from cntrname where name = ? and member_id = ? and origin = ?

        Parameters:
        argName - The name of the contract.
        argMemberId - The ID of the owner member.
        argOrigin - The origin of the contract name.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteEntryFromContractName

        public int deleteEntryFromContractName(java.lang.String argName,
                                               java.lang.Long argMemberId,
                                               java.lang.Integer argOrigin,
                                               boolean flush)
                                        throws java.sql.SQLException,
                                               javax.naming.NamingException

        Deletes an entry from the contract name table.

        The SQL statement used to delete a row from the CNTRNAME table is:

        delete from cntrname where name = ? and member_id = ? and origin = ?

        Parameters:
        argName - The name of the contract.
        argMemberId - The ID of the owner member.
        argOrigin - The origin of the contract name.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deletePolicyTC

        public int deletePolicyTC(java.lang.Long argPolicyId,
                                  java.lang.Long argTCId)
                           throws java.sql.SQLException,
                                  javax.naming.NamingException
        Deprecated. This method is replaced by PolicyTCRelationAccessBean#getEJBRef().remove()

        Deletes an entry from the policy terms and conditions table.

        The SQL statement used to delete a row from the POLICYTC table is:

        delete from policytc where policy_id = ? and termcond_id= ?

        Parameters:
        argPolicyId - The ID of the policy.
        argTCId - The ID of the terms and conditions.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException
        java.sql.SQLException
        javax.ejb.CreateException
      • deletePolicyTCByTC

        public int deletePolicyTCByTC(java.lang.Long argTCId)
                               throws java.sql.SQLException,
                                      javax.naming.NamingException
        Deprecated. This method is replaced by PolicyTCRelationAccessBean#getEJBRef().remove()

        Deletes entries from the policy terms and conditions table

        The SQL statement used to delete rows from the POLICYTC table is:

        delete from policytc where termcond_id= ?

        Parameters:
        argTCId - The ID of the terms and conditions.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteStoreContract

        public int deleteStoreContract(java.lang.Long argStoreId,
                                       java.lang.Long argContractId)
                                throws java.sql.SQLException,
                                       javax.naming.NamingException
        Deprecated. This method is replaced by StoreContractAccessBean#getEJBRef().remove()

        Deletes an entry from the store contract table

        The SQL statement used to delete a row from the STORECNTR table is:

        delete from storecntr where store_id = ? and contract_id = ?

        Parameters:
        argStoreId - The ID of the store.
        argContractId - The ID of the contract.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
        javax.ejb.CreateException
      • deleteXMLDefByTPC

        public int deleteXMLDefByTPC(java.lang.Long argTPCId)
                              throws java.sql.SQLException,
                                     javax.naming.NamingException
        Deprecated. This method is replaced by TradingPositionContainerXMLDefinitionAccessBean#getEJBRef().remove()

        Deletes an entry from the trading position container XML table

        The SQL statement used to delete a row from the TRDPSCNXML table is:

        delete from trdpscnxml where tradeposcn_id = ?

        Parameters:
        argTPCId - The ID of the trading position container.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteXMLDefByTPC

        public int deleteXMLDefByTPC(java.lang.Long argTPCId,
                                     boolean flush)
                              throws java.sql.SQLException,
                                     javax.naming.NamingException
        Deprecated. This method is replaced by TradingPositionContainerXMLDefinitionAccessBean#getEJBRef().remove()

        Deletes entries from the trading position container XML table

        The SQL statement used to delete rows from the TRDPSCNXML table is:

        delete from trdpscnxml where tradeposcn_id = ?

        Parameters:
        argTPCId - The ID of the trading position container.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllBusinessCmdClassNameForPolicy

        public java.util.Vector findAllBusinessCmdClassNameForPolicy(java.lang.Long argPolicyId)
                                                              throws java.sql.SQLException,
                                                                     javax.naming.NamingException

        Retrieves the names of all the business command classes associated with the specified policy

        The SQL query used to fetch all the required rows from the POLICYCMD table is:

        select policycmd.businesscmdclass from policycmd where policycmd.policy_id = ?

        Parameters:
        argPolicyId - The ID of the policy.
        Returns:
        A vector of business command class names.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllBusinessCmdClassNameForPolicy

        public java.util.Vector findAllBusinessCmdClassNameForPolicy(java.lang.Long argPolicyId,
                                                                     boolean flush)
                                                              throws java.sql.SQLException,
                                                                     javax.naming.NamingException

        Retrieves the names of all the business command classes associated with the specified policy

        The SQL query used to fetch all the required rows from the POLICYCMD table is:

        select policycmd.businesscmdclass from policycmd where policycmd.policy_id = ?

        Parameters:
        argPolicyId - The ID of the policy.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of business command class names.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllBusinessCmdInterfaceNameByPolicyType

        public java.util.Vector findAllBusinessCmdInterfaceNameByPolicyType(java.lang.String argPolicyType)
                                                                     throws java.sql.SQLException,
                                                                            javax.naming.NamingException

        Retrieves the names of all the business command interfaces associated with the specified policy

        The SQL query used to fetch all the required rows from the PLCYTYCMIF table is:

        select plcytycmif.businesscmdif from plcytycmif where plcytycmif.policytype_id = ?

        Parameters:
        argPolicyType - The type of the policy.
        Returns:
        A vector of business command interface names.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllBusinessCmdInterfaceNameByPolicyType

        public java.util.Vector findAllBusinessCmdInterfaceNameByPolicyType(java.lang.String argPolicyType,
                                                                            boolean flush)
                                                                     throws java.sql.SQLException,
                                                                            javax.naming.NamingException

        Retrieves the names of all the business command interfaces associated with the specified policy

        The SQL query used to fetch all the required rows from the PLCYTYCMIF table is:

        select plcytycmif.businesscmdif from plcytycmif where plcytycmif.policytype_id = ?

        Parameters:
        argPolicyType - The type of the policy.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of business command interface names.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllBusinessPolicyType

        public java.util.Vector findAllBusinessPolicyType()
                                                   throws java.sql.SQLException,
                                                          javax.naming.NamingException

        Retrieves all the policy types from the POLICYTYPE table.

        The SQL query used to fetch all the required rows from the POLICYTYPE table is:

        SELECT POLICYTYPE_ID FROM POLICYTYPE

        Returns:
        A vector of policy type IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllBusinessPolicyType

        public java.util.Vector findAllBusinessPolicyType(boolean flush)
                                                   throws java.sql.SQLException,
                                                          javax.naming.NamingException

        Retrieves all the policy types from the POLICYTYPE table.

        The SQL query used to fetch all the required rows from the POLICYTYPE table is:

        SELECT POLICYTYPE_ID FROM POLICYTYPE

        Parameters:
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of policy type IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllTCSubType

        public java.util.Vector findAllTCSubType()
                                          throws java.sql.SQLException,
                                                 javax.naming.NamingException

        Retrieves all the term condition subtypes from the TCSUBTYPE table.

        The SQL query used to fetch all the required rows from the TCSUBTYPE table is:

        SELECT TCSUBTYPE_ID FROM TCSUBTYPE

        Returns:
        A vector of term condition subtype IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllTCSubType

        public java.util.Vector findAllTCSubType(boolean flush)
                                          throws java.sql.SQLException,
                                                 javax.naming.NamingException

        Retrieves all the term condition subtypes from the TCSUBTYPE table.

        The SQL query used to fetch all the required rows from the TCSUBTYPE table is:

        SELECT TCSUBTYPE_ID FROM TCSUBTYPE

        Parameters:
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of term condition subtype IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractListInOrderByAccount

        public java.util.Vector findContractListInOrderByAccount(java.lang.Long argAccountId,
                                                                 java.lang.String argOrderByColumn)
                                                          throws java.sql.SQLException,
                                                                 javax.naming.NamingException

        Retrieves all contracts associated with the specified account ID

        The SQL query used to fetch all the required rows from the CONTRACT table, the TRADING table, and the TRDDESC table is:

        select distinct contract.contract_id, contract,name from contract, trading, trddesc where (trading.account_id = ? and trading.markfordelete = 0) and contract.markfordelete = 0 and contract.contract_id = trading.trading_id and contract.contract_id = trddesc.trading_id order by argOrderByColumn

        Parameters:
        argAccountId - The ID of the account.
        argOrderByColumn - The upper case name of the column by which the result should be ordered ascending.
        Returns:
        A vector of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractListInOrderByAccount

        public java.util.Vector findContractListInOrderByAccount(java.lang.Long argAccountId,
                                                                 java.lang.String argOrderByColumn,
                                                                 boolean flush)
                                                          throws java.sql.SQLException,
                                                                 javax.naming.NamingException

        Retrieves all contracts associated with the specified account ID

        The SQL query used to fetch all the required rows from the CONTRACT table, the TRADING table, and the TRDDESC table is:

        select distinct contract.contract_id, contract,name from contract, trading, trddesc where (trading.account_id = ? and trading.markfordelete = 0) and contract.markfordelete = 0 and contract.contract_id = trading.trading_id and contract.contract_id = trddesc.trading_id order by argOrderByColumn

        Parameters:
        argAccountId - The ID of the account.
        argOrderByColumn - The upper case name of the column by which the result should be ordered ascending.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractListInOrderByAccountAndState

        public java.util.Vector findContractListInOrderByAccountAndState(java.lang.Long argAccountId,
                                                                         java.lang.Integer argState,
                                                                         java.lang.String argOrderByColumn)
                                                                  throws java.sql.SQLException,
                                                                         javax.naming.NamingException

        Retrieves all contracts associated with the specified account ID and state

        The SQL query used to fetch all the required rows from the CONTRACT table, the TRADING table, and the TRDDESC table is:

        select distinct contract.contract_id, contract.name from contract, trading, trddesc where (trading.account_id = ? and trading.markfordelete = 0) and contract.state = ? and contract.markfordelete = 0 and contract.contract_id = trading.trading_id and contract.contract_id = trddesc.trading_id order by argOrderByColumn

        Parameters:
        argAccountId - The ID of the account.
        argState - The state of the contract.
        argOrderByColumn - The upper case name of the column by which the result should be ordered ascending.
        Returns:
        A vector of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractListInOrderByAccountAndState

        public java.util.Vector findContractListInOrderByAccountAndState(java.lang.Long argAccountId,
                                                                         java.lang.Integer argState,
                                                                         java.lang.String argOrderByColumn,
                                                                         boolean flush)
                                                                  throws java.sql.SQLException,
                                                                         javax.naming.NamingException

        Retrieves all contracts associated with the specified account ID and state

        The SQL query used to fetch all the required rows from the CONTRACT table, the TRADING table, and the TRDDESC table is:

        select distinct contract.contract_id, contract.name from contract, trading, trddesc where (trading.account_id = ? and trading.markfordelete = 0) and contract.state = ? and contract.markfordelete = 0 and contract.contract_id = trading.trading_id and contract.contract_id = trddesc.trading_id order by argOrderByColumn

        Parameters:
        argAccountId - The ID of the account.
        argState - The state of the contract.
        argOrderByColumn - The upper case name of the column by which the result should be ordered ascending.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findPAttrValueByTCIdOrderByPAttribute

        public PAttrValueAccessBean[] findPAttrValueByTCIdOrderByPAttribute(java.lang.Long argTCId)
                                                                     throws java.sql.SQLException,
                                                                            javax.naming.NamingException

        Retrieves an array of PAttrValueAccessBean objects with the specified term condition ID

        The SQL query used to fetch all the required rows from the PATTRVALUE table is:

        select pattrvalue_id, pattribute_id from pattrvalue where termcond_id = ? order by pattribute_id

        Parameters:
        argTCId - The ID of the terms and conditions.
        Returns:
        An array of PAttrValueAccessBean objects with the specified term condition ID.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findPAttrValueByTCIdOrderByPAttribute

        public PAttrValueAccessBean[] findPAttrValueByTCIdOrderByPAttribute(java.lang.Long argTCId,
                                                                            boolean flush)
                                                                     throws java.sql.SQLException,
                                                                            javax.naming.NamingException

        Retrieves an array of PAttrValueAccessBean objects with the specified term condition ID

        The SQL query used to fetch all the required rows from the PATTRVALUE table is:

        select pattrvalue_id, pattribute_id from pattrvalue where termcond_id = ? order by pattribute_id

        Parameters:
        argTCId - The ID of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        An array of PAttrValueAccessBean objects with the specified term condition ID.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findXMLDefByTPC

        public java.lang.String findXMLDefByTPC(java.lang.Long argTPCId)
                                         throws java.sql.SQLException,
                                                javax.naming.NamingException

        Retrieves the XML definition of the trading position container

        The SQL statement used to query the TRDPSCNXML table is:

        select xmldefinition, sequence from trdpscnxml where tradeposcn_id = ? order by sequence

        Parameters:
        argTPCId - The ID of the trading position container.
        Returns:
        The XML definition associated with the trading position container.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findXMLDefByTPC

        public java.lang.String findXMLDefByTPC(java.lang.Long argTPCId,
                                                boolean flush)
                                         throws java.sql.SQLException,
                                                javax.naming.NamingException

        Retrieves the XML definition of the trading position container

        The SQL statement used to query the TRDPSCNXML table is:

        select xmldefinition, sequence from trdpscnxml where tradeposcn_id = ? order by sequence

        Parameters:
        argTPCId - The ID of the trading position container.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The XML definition associated with the trading position container.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getLargestTCSequenceByTrading

        public int getLargestTCSequenceByTrading(java.lang.Long argTradingId)
                                          throws java.sql.SQLException,
                                                 javax.naming.NamingException

        Retrieves the largest terms and conditions sequence number with the specified trading ID

        The SQL statement used to fetch the result from the TERMCOND table is:

        select max(sequence) from termcond where trading_id = ?

        Parameters:
        argTradingId - The ID of the trading agreement.
        Returns:
        The largest terms and conditions sequence number with the specified trading ID.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getLargestTCSequenceByTrading

        public int getLargestTCSequenceByTrading(java.lang.Long argTradingId,
                                                 boolean flush)
                                          throws java.sql.SQLException,
                                                 javax.naming.NamingException

        Retrieves the largest terms and conditions sequence number with the specified trading ID

        The SQL statement used to fetch the result from the TERMCOND table is:

        select max(sequence) from termcond where trading_id = ?

        Parameters:
        argTradingId - The ID of the trading agreement.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The largest terms and conditions sequence number with the specified trading ID.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCAccessBeanNameBySubType

        public java.lang.String getTCAccessBeanNameBySubType(java.lang.String argTCSubType)
                                                      throws java.sql.SQLException,
                                                             javax.naming.NamingException

        Retrieves the name of the terms and conditions access bean by the specified subtype

        The SQL statement used to query the TCSUBTYPE table is:

        select distinct t1.accessbeanname from tcsubtype t1 where (t1.tcsubtype_id = ?)

        Parameters:
        argTCSubType - The subtype of the terms and conditions.
        Returns:
        The name of the terms and conditions access bean.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCAccessBeanNameBySubType

        public java.lang.String getTCAccessBeanNameBySubType(java.lang.String argTCSubType,
                                                             boolean flush)
                                                      throws java.sql.SQLException,
                                                             javax.naming.NamingException

        Retrieves the name of the terms and conditions access bean by the specified subtype

        The SQL statement used to query the TCSUBTYPE table is:

        select distinct t1.accessbeanname from tcsubtype t1 where (t1.tcsubtype_id = ?)

        Parameters:
        argTCSubType - The subtype of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The name of the terms and conditions access bean.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCAccessBeanNameByTC

        public java.lang.String getTCAccessBeanNameByTC(java.lang.Long argTCId)
                                                 throws java.sql.SQLException,
                                                        javax.naming.NamingException

        Retrieves the name of the terms and conditions access bean by the specified terms and conditions ID

        The SQL statement used to query the TCSUBTYPE table is:

        select distinct t1.accessbeanname from tcsubtype t1, termcond t2 where t1.tcsubtype_id = t2.tcsubtype_id and t2.termcond_id = ?

        Parameters:
        argTCId - The ID of the terms and conditions.
        Returns:
        The name of the terms and conditions access bean.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCAccessBeanNameByTC

        public java.lang.String getTCAccessBeanNameByTC(java.lang.Long argTCId,
                                                        boolean flush)
                                                 throws java.sql.SQLException,
                                                        javax.naming.NamingException

        Retrieves the name of the terms and conditions access bean by the specified terms and conditions ID

        The SQL statement used to query the TCSUBTYPE table is:

        select distinct t1.accessbeanname from tcsubtype t1, termcond t2 where t1.tcsubtype_id = t2.tcsubtype_id and t2.termcond_id = ?

        Parameters:
        argTCId - The ID of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The name of the terms and conditions access bean.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCDeployCmdBySubType

        public java.lang.String getTCDeployCmdBySubType(java.lang.String argTCSubType)
                                                 throws java.sql.SQLException,
                                                        javax.naming.NamingException

        Retrieves the deploy command associated with the terms and conditions subtype

        The SQL statement used to query the TCSUBTYPE table is:

        select distinct t1.deploycommand from tcsubtype t1 where (t1.tcsubtype_id = ?)

        Parameters:
        argTCSubType - The subtype of the terms and conditions.
        Returns:
        The deploy command associated with the terms and conditions subtype.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCDeployCmdBySubType

        public java.lang.String getTCDeployCmdBySubType(java.lang.String argTCSubType,
                                                        boolean flush)
                                                 throws java.sql.SQLException,
                                                        javax.naming.NamingException

        Retrieves the deploy command associated with the terms and conditions subtype

        The SQL statement used to query the TCSUBTYPE table is:

        select distinct t1.deploycommand from tcsubtype t1 where (t1.tcsubtype_id = ?)

        Parameters:
        argTCSubType - The subtype of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The deploy command associated with the terms and conditions subtype.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCDeployCmdByTC

        public java.lang.String getTCDeployCmdByTC(java.lang.Long argTCId)
                                            throws java.sql.SQLException,
                                                   javax.naming.NamingException

        Retrieves the deploy command associated with the terms and conditions ID

        The SQL statement used to query the TCSUBTYPE table and the TERMCOND table is:

        select distinct t1.deploycommand from tcsubtype t1, termcond t2 where t1.tcsubtype_id = t2.tcsubtype_id and t2.termcond_id = ?

        Parameters:
        argTCId - The ID of the terms and conditions.
        Returns:
        The deploy command associated with the terms and conditions ID.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getTCDeployCmdByTC

        public java.lang.String getTCDeployCmdByTC(java.lang.Long argTCId,
                                                   boolean flush)
                                            throws java.sql.SQLException,
                                                   javax.naming.NamingException

        Retrieves the deploy command associated with the terms and conditions ID

        The SQL statement used to query the TCSUBTYPE table and the TERMCOND table is:

        select distinct t1.deploycommand from tcsubtype t1, termcond t2 where t1.tcsubtype_id = t2.tcsubtype_id and t2.termcond_id = ?

        Parameters:
        argTCId - The ID of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The deploy command associated with the terms and conditions ID.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • queryContractName

        public java.lang.String queryContractName(java.lang.String argName,
                                                  java.lang.Long argMemberId,
                                                  java.lang.Integer argOrigin)
                                           throws java.sql.SQLException,
                                                  javax.naming.NamingException

        Retrieves the name of the contract associated with the specified member ID and origin

        The SQL statement used to query the CNTRNAME table is:

        select name from cntrname where name = ? and member_id = ? and origin = ? //91983 for update

        Parameters:
        argName - The name of the contract.
        argMemberId - The ID of the owner member.
        argOrigin - The origin of the contract.
        Returns:
        The name of the contract.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • queryContractName

        public java.lang.String queryContractName(java.lang.String argName,
                                                  java.lang.Long argMemberId,
                                                  java.lang.Integer argOrigin,
                                                  boolean flush)
                                           throws java.sql.SQLException,
                                                  javax.naming.NamingException

        Retrieves the name of the contract associated with the specified member ID and origin

        The SQL statement used to query the CNTRNAME table is:

        select name from cntrname where name = ? and member_id = ? and origin = ? //91983 for update

        Parameters:
        argName - The name of the contract.
        argMemberId - The ID of the owner member.
        argOrigin - The origin of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The name of the contract.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • queryStoreContract

        public boolean queryStoreContract(java.lang.Integer argStoreId,
                                          java.lang.Long argContractId)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by StoreContractAccessBean.findByContract(Long)

        Queries whether a particular contract exists for a specified store

        The SQL query used to fetch all the required rows from the STORECNTR table is:

        select * from storecntr where store_id = ? and contract_id = ?

        Parameters:
        argStoreId - The ID of the store.
        argContractId - The ID of the contract.
        Returns:
        A flag indicating whether the contract exists for the specified store.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • queryStoreContract

        public boolean queryStoreContract(java.lang.Integer argStoreId,
                                          java.lang.Long argContractId,
                                          boolean flush)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by StoreContractAccessBean.findByContract(Long)

        Queries whether a particular contract exists for a specified store

        The SQL query used to fetch all the required rows from the STORECNTR table is:

        select * from storecntr where store_id = ? and contract_id = ?

        Parameters:
        argStoreId - The ID of the store.
        argContractId - The ID of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A flag indicating whether the contract exists for the specified store.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractStoreXML

        public java.lang.String findContractStoreXML(java.lang.Long argContractId)
                                              throws java.sql.SQLException,
                                                     javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean.getStoreXML()

        Finds the XML in the Contract Store table associated with the specified contract ID.

        The SQL statement used to fetch the XML from the STORECNTR table is:

        SELECT STOREXML FROM CNTRSTORE WHERE CONTRACT_ID = ?

        Parameters:
        aContractId - The ID of the contract.
        Returns:
        The XML in the Contract Store table.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractStoreXML

        public java.lang.String findContractStoreXML(java.lang.Long argContractId,
                                                     boolean flush)
                                              throws java.sql.SQLException,
                                                     javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean.getStoreXML()

        Finds the XML in the Contract Store table associated with the specified contract ID.

        The SQL statement used to fetch the XML from the STORECNTR table is:

        SELECT STOREXML FROM CNTRSTORE WHERE CONTRACT_ID = ?

        Parameters:
        aContractId - The ID of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The XML in the Contract Store table.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateContractStoreXML

        public int updateContractStoreXML(java.lang.Long argContractId,
                                          java.lang.String argStoreXML)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean.setStoreXML(String)

        Updates the XML in the Contract Store table associated with the specified contract ID.

        The SQL statement used to update the XML in the STORECNTR table is:

        UPDATE CNTRSTORE SET STOREXML = ? WHERE CONTRACT_ID = ?

        Parameters:
        aContractId - The ID of the contract.
        argStoreXML - The store XML.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateContractStoreXML

        public int updateContractStoreXML(java.lang.Long argContractId,
                                          java.lang.String argStoreXML,
                                          boolean flush)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean.setStoreXML(String)

        Updates the XML in the Contract Store table associated with the specified contract ID.

        The SQL statement used to update the XML in the STORECNTR table is:

        UPDATE CNTRSTORE SET STOREXML = ? WHERE CONTRACT_ID = ?

        Parameters:
        aContractId - The ID of the contract.
        argStoreXML - The store XML.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addContractStoreXML

        public int addContractStoreXML(java.lang.Long argContractId,
                                       java.lang.String argStoreXML)
                                throws java.sql.SQLException,
                                       javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean.ContractStoreAccessBean(Long,String)

        Inserts the XML in the Contract Store table associated with the specified contract ID.

        The SQL statement used to insert the XML in the STORECNTR table is:

        INSERT INTO CNTRSTORE (CONTRACT_ID, STOREXML) VALUES(?, ?)

        Parameters:
        aContractId - The ID of the contract.
        argStoreXML - The store XML.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteContractStoreXML

        public int deleteContractStoreXML(java.lang.Long contractId)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean#getEJBRef().remove()

        Deletes a row from the Contract Store table associated with the specified contract ID.

        The SQL statement used to delete a row from the STORECNTR table is:

        DELETE FROM CNTRSTORE WHERE CONTRACT_ID = ?

        Parameters:
        aContractId - The ID of the contract.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteContractStoreXML

        public int deleteContractStoreXML(java.lang.Long contractId,
                                          boolean flush)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by ContractStoreAccessBean#getEJBRef().remove()

        Deletes a row from the Contract Store table associated with the specified contract ID.

        The SQL statement used to delete a row from the STORECNTR table is:

        DELETE FROM CNTRSTORE WHERE CONTRACT_ID = ?

        Parameters:
        aContractId - The ID of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findActiveContractsDeployedInStore

        public java.util.Vector findActiveContractsDeployedInStore(java.lang.Integer storeId)
                                                            throws java.sql.SQLException,
                                                                   javax.naming.NamingException

        Retrieves the contracts in active state that are deployed in the specified store.

        The SQL statement used to query the TRADING and STORECNTR tables is:

        SELECT T1.TRADING_ID FROM TRADING T1, STORECNTR T2 WHERE T1.STATE = 1 AND T1.MARKFORDELETE = 0 AND T1.TRADING_ID = T2.CONTRACT_ID AND T2.STORE_ID = ? AND (T1.STARTTIME < %CURRENTTIME% OR T1.STARTTIME IS NULL ) AND (T1.ENDTIME > %CURRENTTIME% OR T1.ENDTIME IS NULL)

        Parameters:
        storeId - The ID of the store that the contract is deployed into.
        Returns:
        A vector of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findActiveContractsDeployedInStore

        public java.util.Vector findActiveContractsDeployedInStore(java.lang.Integer storeId,
                                                                   boolean flush)
                                                            throws java.sql.SQLException,
                                                                   javax.naming.NamingException

        Retrieves the contracts in active state that are deployed in the specified store.

        The SQL statement used to query the TRADING and STORECNTR tables is:

        SELECT T1.TRADING_ID FROM TRADING T1, STORECNTR T2 WHERE T1.STATE = 1 AND T1.MARKFORDELETE = 0 AND T1.TRADING_ID = T2.CONTRACT_ID AND T2.STORE_ID = ? AND (T1.STARTTIME < %CURRENTTIME% OR T1.STARTTIME IS NULL ) AND (T1.ENDTIME > %CURRENTTIME% OR T1.ENDTIME IS NULL)

        Parameters:
        storeId - The ID of the store that the contract is deployed into.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addTCAttributeXML

        public int addTCAttributeXML(java.lang.Long argTermCondId,
                                     java.lang.Long argTradingId,
                                     java.lang.Integer argType,
                                     java.lang.String argXMLDefinition,
                                     java.lang.Integer argSequence)
                              throws java.sql.SQLException,
                                     javax.naming.NamingException

        Inserts the XML definition into the TCATTR table.

        The SQL statement used to insert into the TCATTR table is:

        INSERT INTO TCATTR (TERMCOND_ID, TRADING_ID, TYPE, XMLDEFINITION, SEQUENCE) VALUES(?, ?, ?, ?, ?)

        Parameters:
        argTermCondId - The ID of the term condition.
        argTradingId - The ID of the trading agreement.
        argType - The type of terms and conditions.
        argXMLDefinition - The XML definition to be stored in the TCATTR table.
        argSequence - The sequence of the term condition attribute.
        Returns:
        The number of rows added.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteTCAttributeXML

        public int deleteTCAttributeXML(java.lang.Long argTermCondId,
                                        java.lang.Integer argType,
                                        java.lang.Integer argSequence)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException
        Deprecated. This method is replaced by TermConditionAttributeAccessBean#getEJBRef().remove()

        Deletes a row from the TCATTR table.

        The SQL statement used to delete the row from the TCATTR table is:

        DELETE FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ? AND SEQUENCE = ?

        Parameters:
        argTermCondId - The ID of the term condition.
        argType - The type of terms and conditions.
        argSequence - The sequence of the term condition attribute.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteTCAttributeXML

        public int deleteTCAttributeXML(java.lang.Long argTermCondId,
                                        java.lang.Integer argType,
                                        java.lang.Integer argSequence,
                                        boolean flush)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException
        Deprecated. This method is replaced by TermConditionAttributeAccessBean#getEJBRef().remove()

        Deletes a row from the TCATTR table.

        The SQL statement used to delete the row from the TCATTR table is:

        DELETE FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ? AND SEQUENCE = ?

        Parameters:
        argTermCondId - The ID of the term condition.
        argType - The type of terms and conditions.
        argSequence - The sequence of the term condition attribute.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllTCAttributeXML

        public java.util.Vector findAllTCAttributeXML(java.lang.Long argTermCondId,
                                                      java.lang.Integer argType)
                                               throws java.sql.SQLException,
                                                      javax.naming.NamingException

        Finds all the term condition attribute XML matching the specified term condition ID and type.

        The SQL statement used to query the TCATTR table is:

        SELECT XMLDEFINITION FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ?

        Parameters:
        argTermCondId - The ID of the term condition.
        argType - The type of term condition.
        Returns:
        A vector of XML definitions.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAllTCAttributeXML

        public java.util.Vector findAllTCAttributeXML(java.lang.Long argTermCondId,
                                                      java.lang.Integer argType,
                                                      boolean flush)
                                               throws java.sql.SQLException,
                                                      javax.naming.NamingException

        Finds all the term condition attribute XML matching the specified term condition ID and type.

        The SQL statement used to query the TCATTR table is:

        SELECT XMLDEFINITION FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ?

        Parameters:
        argTermCondId - The ID of the term condition.
        argType - The type of term condition.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of XML definitions.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTCAttributeXML

        public int updateTCAttributeXML(java.lang.Long argTermCondId,
                                        java.lang.Long argTradingId,
                                        java.lang.Integer argType,
                                        java.lang.String argXMLDefinition,
                                        java.lang.Integer argSequence)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException
        Deprecated. This method is replaced by TermConditionAttributeAccessBean.setXMLDefinition(String)

        Updates the term condition attribute XML in the TCATTR table.

        The SQL statement used to update the TCATTR table is:

        UPDATE TCATTR SET XMLDEFINITION = ? WHERE TERMCOND_ID = ? AND TYPE = ? AND SEQUENCE = ?

        Parameters:
        argTermCondId - The ID of the term condition.
        argTradingId - The ID of the trading agreement.
        argType - The type of term condition.
        argXMLDefinition - The XML definition of the term condition attribute.
        argSequence - The sequence of the term condition attribute.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTCAttributeXML

        public int updateTCAttributeXML(java.lang.Long argTermCondId,
                                        java.lang.Long argTradingId,
                                        java.lang.Integer argType,
                                        java.lang.String argXMLDefinition,
                                        java.lang.Integer argSequence,
                                        boolean flush)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException
        Deprecated. This method is replaced by TermConditionAttributeAccessBean.setXMLDefinition(String)

        Updates the term condition attribute XML in the TCATTR table.

        The SQL statement used to update the TCATTR table is:

        UPDATE TCATTR SET XMLDEFINITION = ? WHERE TERMCOND_ID = ? AND TYPE = ? AND SEQUENCE = ?

        Parameters:
        argTermCondId - The ID of the term condition.
        argTradingId - The ID of the trading agreement.
        argType - The type of term condition.
        argXMLDefinition - The XML definition of the term condition attribute.
        argSequence - The sequence of the term condition attribute.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTCIdInTCAttributeByTradingIdAndType

        public java.util.Vector findTCIdInTCAttributeByTradingIdAndType(java.lang.Long tradingId,
                                                                        java.lang.Integer type)
                                                                 throws java.sql.SQLException,
                                                                        javax.naming.NamingException

        Finds all the terms and conditions in the TCATTR table matching the specified trading agreement ID and type.

        The SQL statement used to query the TCATTR table is:

        SELECT DISTINCT TERMCOND_ID FROM TCATTR WHERE TRADING_ID = ? AND TYPE = ?

        Parameters:
        tradingId - The ID of the trading agreement.
        type - The type of term condition.
        Returns:
        A vector of term condition IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTCIdInTCAttributeByTradingIdAndType

        public java.util.Vector findTCIdInTCAttributeByTradingIdAndType(java.lang.Long tradingId,
                                                                        java.lang.Integer type,
                                                                        boolean flush)
                                                                 throws java.sql.SQLException,
                                                                        javax.naming.NamingException

        Finds all the terms and conditions in the TCATTR table matching the specified trading agreement ID and type.

        The SQL statement used to query the TCATTR table is:

        SELECT DISTINCT TERMCOND_ID FROM TCATTR WHERE TRADING_ID = ? AND TYPE = ?

        Parameters:
        tradingId - The ID of the trading agreement.
        type - The type of term condition.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of term condition IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findInclusionProductSetIdsByTCIdAndType

        public java.util.Vector findInclusionProductSetIdsByTCIdAndType(java.lang.Long TCId)
                                                                 throws java.sql.SQLException,
                                                                        javax.naming.NamingException

        Finds all the inclusion product sets.

        The SQL statement used to query the product set adjustment table is:

        SELECT PRODUCTSET_ID FROM PSETADJMNT WHERE TERMCOND_ID = ? AND TYPE IN (0, 2)

        Parameters:
        TCId - The ID of the term condition.
        Returns:
        A vector of product set IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findInclusionProductSetIdsByTCIdAndType

        public java.util.Vector findInclusionProductSetIdsByTCIdAndType(java.lang.Long TCId,
                                                                        boolean flush)
                                                                 throws java.sql.SQLException,
                                                                        javax.naming.NamingException

        Finds all the inclusion product sets.

        The SQL statement used to query the product set adjustment table is:

        SELECT PRODUCTSET_ID FROM PSETADJMNT WHERE TERMCOND_ID = ? AND TYPE IN (0, 2)

        Parameters:
        TCId - The ID of the term condition.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of product set IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findExclusionProductSetIdsByTCIdAndType

        public java.util.Vector findExclusionProductSetIdsByTCIdAndType(java.lang.Long TCId)
                                                                 throws java.sql.SQLException,
                                                                        javax.naming.NamingException

        Finds all the exclusion product sets.

        The SQL statement used to query the product set adjustment table is:

        SELECT PRODUCTSET_ID FROM PSETADJMNT WHERE TERMCOND_ID = ? AND TYPE IN (1, 3)

        Parameters:
        TCId - The ID of the term condition.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of product set IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findExclusionProductSetIdsByTCIdAndType

        public java.util.Vector findExclusionProductSetIdsByTCIdAndType(java.lang.Long TCId,
                                                                        boolean flush)
                                                                 throws java.sql.SQLException,
                                                                        javax.naming.NamingException

        Finds all the exclusion product sets.

        The SQL statement used to query the product set adjustment table is:

        SELECT PRODUCTSET_ID FROM PSETADJMNT WHERE TERMCOND_ID = ? AND TYPE IN (1, 3)

        Parameters:
        TCId - The ID of the term condition.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of product set IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findStoreIdsInStoreContractByContractId

        public java.lang.Integer[] findStoreIdsInStoreContractByContractId(java.lang.Long contractId)
                                                                    throws java.sql.SQLException,
                                                                           javax.naming.NamingException

        Finds all the stores in the store contract table matching the specified contract ID.

        The SQL statement used to query the STORECNTR table is:

        SELECT STORE_ID FROM STORECNTR WHERE CONTRACT_ID = ?

        Parameters:
        contractId - The ID of the contract.
        Returns:
        An array of store IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findStoreIdsInStoreContractByContractId

        public java.lang.Integer[] findStoreIdsInStoreContractByContractId(java.lang.Long contractId,
                                                                           boolean flush)
                                                                    throws java.sql.SQLException,
                                                                           javax.naming.NamingException

        Finds all the stores in the store contract table matching the specified contract ID.

        The SQL statement used to query the STORECNTR table is:

        SELECT STORE_ID FROM STORECNTR WHERE CONTRACT_ID = ?

        Parameters:
        contractId - The ID of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        An array of store IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addProductSetAdjustment

        public int addProductSetAdjustment(java.lang.Long termcondId,
                                           java.lang.Integer productsetId,
                                           java.lang.Double adjustment,
                                           java.lang.Integer precedence,
                                           java.lang.Integer type)
                                    throws java.sql.SQLException,
                                           javax.naming.NamingException

        Inserts a product set adjustment row into the PSETADJMNT table.

        The SQL used to insert the row is:

        INSERT INTO PSETADJMNT (TERMCOND_ID, PRODUCTSET_ID, ADJUSTMENT, PRECEDENCE, TYPE) VALUES (?, ?, ?, ?, ?)

        Parameters:
        termcondId - The ID of the term condition.
        productsetId - The ID of the product set.
        adjustment - The product set adjustment percentage.
        precedence - The precedence of the product set adjustment.
        type - The type of product set adjustment.
        Returns:
        The number of rows added.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • addProductSetAdjustment

        public int addProductSetAdjustment(java.lang.Long termcondId,
                                           java.lang.Integer productsetId,
                                           java.lang.Double adjustment,
                                           java.lang.Integer precedence,
                                           java.lang.Integer type,
                                           boolean flush)
                                    throws java.sql.SQLException,
                                           javax.naming.NamingException

        Inserts a product set adjustment row into the PSETADJMNT table.

        The SQL used to insert the row is:

        INSERT INTO PSETADJMNT (TERMCOND_ID, PRODUCTSET_ID, ADJUSTMENT, PRECEDENCE, TYPE) VALUES (?, ?, ?, ?, ?)

        Parameters:
        termcondId - The ID of the term condition.
        productsetId - The ID of the product set.
        adjustment - The product set adjustment percentage.
        precedence - The precedence of the product set adjustment.
        type - The type of product set adjustment.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows added.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateProductSetAdjustment

        public int updateProductSetAdjustment(java.lang.Long termcondId,
                                              java.lang.Integer productsetId,
                                              java.lang.Double adjustment,
                                              java.lang.Integer precedence,
                                              java.lang.Integer type)
                                       throws java.sql.SQLException,
                                              javax.naming.NamingException

        Updates a product set adjustment row in the PSETADJMNT table.

        The SQL used to update the PSETADJMNT table is:

        UPDATE PSETADJMNT SET ADJUSTMENT = ?, PRECEDENCE = ?, TYPE = ? WHERE TERMCOND_ID = ? AND PRODUCTSET_ID = ?

        Parameters:
        termcondId - The ID of the term condition.
        productsetId - The ID of the product set.
        adjustment - The product set adjustment percentage.
        precedence - The precedence of the product set adjustment.
        type - The type of product set adjustment.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateProductSetAdjustment

        public int updateProductSetAdjustment(java.lang.Long termcondId,
                                              java.lang.Integer productsetId,
                                              java.lang.Double adjustment,
                                              java.lang.Integer precedence,
                                              java.lang.Integer type,
                                              boolean flush)
                                       throws java.sql.SQLException,
                                              javax.naming.NamingException

        Updates a product set adjustment row in the PSETADJMNT table.

        The SQL used to update the PSETADJMNT table is:

        UPDATE PSETADJMNT SET ADJUSTMENT = ?, PRECEDENCE = ?, TYPE = ? WHERE TERMCOND_ID = ? AND PRODUCTSET_ID = ?

        Parameters:
        termcondId - The ID of the term condition.
        productsetId - The ID of the product set.
        adjustment - The product set adjustment percentage.
        precedence - The precedence of the product set adjustment.
        type - The type of product set adjustment.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteProductSetAdjustment

        public int deleteProductSetAdjustment(java.lang.Long termcondId,
                                              java.lang.Integer productsetId)
                                       throws java.sql.SQLException,
                                              javax.naming.NamingException

        Deletes a product set adjustment row from the PSETADJMNT table.

        The SQL used to delete the row from the PSETADJMNT table is:

        DELETE FROM PSETADJMNT WHERE TERMCOND_ID = ? AND PRODUCTSET_ID = ?

        Parameters:
        termcondId - The ID of the term condition.
        productsetId - The ID of the product set.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • deleteProductSetAdjustment

        public int deleteProductSetAdjustment(java.lang.Long termcondId,
                                              java.lang.Integer productsetId,
                                              boolean flush)
                                       throws java.sql.SQLException,
                                              javax.naming.NamingException

        Deletes a product set adjustment row from the PSETADJMNT table.

        The SQL used to delete the row from the PSETADJMNT table is:

        DELETE FROM PSETADJMNT WHERE TERMCOND_ID = ? AND PRODUCTSET_ID = ?

        Parameters:
        termcondId - The ID of the term condition.
        productsetId - The ID of the product set.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows deleted.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findProductSetIdsByTCIdAndType

        public java.lang.Integer[] findProductSetIdsByTCIdAndType(java.lang.Long termcondId,
                                                                  java.lang.Integer type)
                                                           throws java.sql.SQLException,
                                                                  javax.naming.NamingException

        Finds all the product sets in the product set adjustment table matching the specified term condition ID and type.

        The SQL statement used to query the PSETADJMNT table is:

        SELECT PRODUCTSET_ID FROM PSETADJMNT WHERE TERMCOND_ID = ? AND TYPE = ?

        Parameters:
        termcondId - The ID of the term condition.
        type - The type of the term condition.
        Returns:
        An array of product set IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findProductSetIdsByTCIdAndType

        public java.lang.Integer[] findProductSetIdsByTCIdAndType(java.lang.Long termcondId,
                                                                  java.lang.Integer type,
                                                                  boolean flush)
                                                           throws java.sql.SQLException,
                                                                  javax.naming.NamingException

        Finds all the product sets in the product set adjustment table matching the specified term condition ID and type.

        The SQL statement used to query the PSETADJMNT table is:

        SELECT PRODUCTSET_ID FROM PSETADJMNT WHERE TERMCOND_ID = ? AND TYPE = ?

        Parameters:
        termcondId - The ID of the term condition.
        type - The type of the term condition.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        An array of product set IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getLargestSequenceInTCAttribute

        public int getLargestSequenceInTCAttribute(java.lang.Long termcondId,
                                                   java.lang.Integer type)
                                            throws java.sql.SQLException,
                                                   javax.naming.NamingException

        Finds the largest sequence in the TCATTR table matching the specified term condition ID and type.

        The SQL statements used to query the TCATTR table are:

        SELECT SEQUENCE FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ?

        SELECT MAX(SEQUENCE) FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ?

        Parameters:
        termcondId - The term condition ID.
        type - The term condition type.
        Returns:
        The largest sequence in the TCATTR table.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • getLargestSequenceInTCAttribute

        public int getLargestSequenceInTCAttribute(java.lang.Long termcondId,
                                                   java.lang.Integer type,
                                                   boolean flush)
                                            throws java.sql.SQLException,
                                                   javax.naming.NamingException

        Finds the largest sequence in the TCATTR table matching the specified term condition ID and type.

        The SQL statements used to query the TCATTR table are:

        SELECT SEQUENCE FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ?

        SELECT MAX(SEQUENCE) FROM TCATTR WHERE TERMCOND_ID = ? AND TYPE = ?

        Parameters:
        termcondId - The term condition ID.
        type - The term condition type.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The largest sequence in the TCATTR table.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findSameFamilyContracts

        public java.lang.Long[] findSameFamilyContracts(java.lang.String name,
                                                        java.lang.Long ownerId,
                                                        java.lang.Integer origin,
                                                        java.lang.Long contractId)
                                                 throws java.sql.SQLException,
                                                        javax.naming.NamingException

        Finds all the contracts with the same name, owner, origin, and contract ID.

        The SQL statement used to query the CONTRACT table is:

        SELECT CONTRACT_ID FROM CONTRACT WHERE NAME = ? AND MEMBER_ID = ? AND ORIGIN = ? AND MARKFORDELETE = 0 AND CONTRACT_ID %lt; > ?

        Parameters:
        name - The name of the contract.
        ownerId - The owner of the contract.
        origin - The origin of the contract.
        contractId - The contract ID.
        Returns:
        An array of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findSameFamilyContracts

        public java.lang.Long[] findSameFamilyContracts(java.lang.String name,
                                                        java.lang.Long ownerId,
                                                        java.lang.Integer origin,
                                                        java.lang.Long contractId,
                                                        boolean flush)
                                                 throws java.sql.SQLException,
                                                        javax.naming.NamingException

        Finds all the contracts with the same name, owner, origin, and contract ID.

        The SQL statement used to query the CONTRACT table is:

        SELECT CONTRACT_ID FROM CONTRACT WHERE NAME = ? AND MEMBER_ID = ? AND ORIGIN = ? AND MARKFORDELETE = 0 AND CONTRACT_ID %lt; > ?

        Parameters:
        name - The name of the contract.
        ownerId - The owner of the contract.
        origin - The origin of the contract.
        contractId - The contract ID.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        An array of contract IDs.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findProductSetAdjustments

        public java.util.Vector findProductSetAdjustments(java.lang.Long termcondId)
                                                   throws java.sql.SQLException,
                                                          javax.naming.NamingException

        Finds all the product set adjustments matching the specified term condition ID.

        The SQL statement used to query the PSETADJMNT table is:

        SELECT TERMCOND_ID, PRODUCTSET_ID, TYPE, ADJUSTMENT, PRECEDENCE FROM PSETADJMNT WHERE TERMCOND_ID = ? ORDER BY TERMCOND_ID, PRECEDENCE DESC, ADJUSTMENT, PRODUCTSET_ID

        Parameters:
        termcondId - The term condition ID.
        Returns:
        A vector of vectors, where each of the vectors presents the term condition ID, product set ID, type, adjustment, and precendence in this order.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findProductSetAdjustments

        public java.util.Vector findProductSetAdjustments(java.lang.Long termcondId,
                                                          boolean flush)
                                                   throws java.sql.SQLException,
                                                          javax.naming.NamingException

        Finds all the product set adjustments matching the specified term condition ID.

        The SQL statement used to query the PSETADJMNT table is:

        SELECT TERMCOND_ID, PRODUCTSET_ID, TYPE, ADJUSTMENT, PRECEDENCE FROM PSETADJMNT WHERE TERMCOND_ID = ? ORDER BY TERMCOND_ID, PRECEDENCE DESC, ADJUSTMENT, PRODUCTSET_ID

        Parameters:
        termcondId - The term condition ID.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        A vector of vectors, where each of the vectors presents the term condition ID, product set ID, type, adjustment, and precendence in this order.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAccountIdByUserIdStoreId

        public java.lang.Long findAccountIdByUserIdStoreId(java.lang.Long aUserId,
                                                           java.lang.Integer aStoreId)
                                                    throws java.sql.SQLException,
                                                           javax.naming.NamingException

        Retrieves the account ID associated with the specified user member ID & store ID

        The SQL statement used to query the MBRREL, PARTICIPNT , and TRADING tables is:

        SELECT DISTINCT T1.ACCOUNT_ID FROM ACCOUNT T1, PARTICIPNT T2, MBRREL T3 WHERE T2.MEMBER_ID=T3.ANCESTOR_ID AND T2.PARTROLE_ID=5 AND T1.ACCOUNT_ID=T2.TRADING_ID AND T1.MARKFORDELETE=0 AND T3.DESCENDANT_ID=? AND (T1.STORE_ID IS NULL OR T1.STORE_ID=?)

        Parameters:
        aUserId - The ID of the user member.
        aStoreId - The store ID of the user member.
        Returns:
        The account ID associated with the specified member & store.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAccountIdByUserIdStoreId

        public java.lang.Long findAccountIdByUserIdStoreId(java.lang.Long aUserId,
                                                           java.lang.Integer aStoreId,
                                                           boolean flush)
                                                    throws java.sql.SQLException,
                                                           javax.naming.NamingException

        Retrieves the account ID associated with the specified user member ID & store ID

        The SQL statement used to query the MBRREL, PARTICIPNT , and TRADING tables is:

        SELECT DISTINCT T1.ACCOUNT_ID FROM ACCOUNT T1, PARTICIPNT T2, MBRREL T3 WHERE T2.MEMBER_ID=T3.ANCESTOR_ID AND T2.PARTROLE_ID=5 AND T1.ACCOUNT_ID=T2.TRADING_ID AND T1.MARKFORDELETE=0 AND T3.DESCENDANT_ID=? AND (T1.STORE_ID IS NULL OR T1.STORE_ID=?)

        Parameters:
        aUserId - The ID of the user member.
        aStoreId - The store ID of the user member.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The account ID associated with the specified member & store.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAccountIdByUserIdStoreId

        public java.lang.Long findAccountIdByUserIdStoreId(java.lang.Long aUserId,
                                                           java.lang.Integer aStoreId,
                                                           java.lang.Long aOrganizationId)
                                                    throws java.sql.SQLException,
                                                           javax.naming.NamingException

        Retrieves the account ID associated with the specified user member ID & store ID

        The SQL statement used to query the MBRREL, PARTICIPNT , and TRADING tables is:

        SELECT DISTINCT T1.ACCOUNT_ID FROM ACCOUNT T1, PARTICIPNT T2 WHERE T2.MEMBER_ID=? AND T2.PARTROLE_ID=5 AND T1.ACCOUNT_ID=T2.TRADING_ID AND T1.MARKFORDELETE=0 AND (T1.STORE_ID IS NULL OR T1.STORE_ID=?)

        Parameters:
        aUserId - The ID of the user member.
        aStoreId - The store ID of the user member.
        aOrganizationId - The active organization ID of the member.
        Returns:
        The account ID associated with the specified member & store.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findAccountIdByUserIdStoreId

        public java.lang.Long findAccountIdByUserIdStoreId(java.lang.Long aUserId,
                                                           java.lang.Integer aStoreId,
                                                           java.lang.Long aOrganizationId,
                                                           boolean flush)
                                                    throws java.sql.SQLException,
                                                           javax.naming.NamingException

        Retrieves the account ID associated with the specified user member ID & store ID

        The SQL statement used to query the MBRREL, PARTICIPNT , and TRADING tables is:

        SELECT DISTINCT T1.ACCOUNT_ID FROM ACCOUNT T1, PARTICIPNT T2 WHERE T2.MEMBER_ID=? AND T2.PARTROLE_ID=5 AND T1.ACCOUNT_ID=T2.TRADING_ID AND T1.MARKFORDELETE=0 AND (T1.STORE_ID IS NULL OR T1.STORE_ID=?)

        Parameters:
        aUserId - The ID of the user member.
        aStoreId - The store ID of the user member.
        aOrganizationId - The active organization ID of the member.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The account ID associated with the specified member & store.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractComments

        public java.lang.String findContractComments(java.lang.Long aContractId)
                                              throws java.sql.SQLException,
                                                     javax.naming.NamingException
        Deprecated. This method is replaced by ContractAccessBean.getComments()

        Retrieves the comments associated with the specified contract

        The SQL statement used to query the CONTRACT table is:

        select contract.origin, contract.comments, contract.state from contract where contract.contract_id = ?

        Parameters:
        aContractId - The ID of the contract.
        Returns:
        The comments associated with the specified contract.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findContractComments

        public java.lang.String findContractComments(java.lang.Long aContractId,
                                                     boolean flush)
                                              throws java.sql.SQLException,
                                                     javax.naming.NamingException
        Deprecated. This method is replaced by ContractAccessBean.getComments()

        Retrieves the comments associated with the specified contract

        The SQL statement used to query the CONTRACT table is:

        select contract.origin, contract.comments, contract.state from contract where contract.contract_id = ?

        Parameters:
        aContractId - The ID of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The comments associated with the specified contract.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findParticipntInformation

        public java.lang.String findParticipntInformation(java.lang.Long aParticipntId)
                                                   throws java.sql.SQLException,
                                                          javax.naming.NamingException
        Deprecated. This method is replaced by ParticipantAccessBean.getInformation()

        Retrieves the information associated with the specified participant

        The SQL statement used to query the PARTICIPNT table is:

        slect participnt.member_id, participnt.information, participnt.termcond_id from participnt where participnt.participnt_id = ?

        Parameters:
        aParticipntId - The ID of the participant.
        Returns:
        The information associated with the specified participant.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findParticipntInformation

        public java.lang.String findParticipntInformation(java.lang.Long aParticipntId,
                                                          boolean flush)
                                                   throws java.sql.SQLException,
                                                          javax.naming.NamingException
        Deprecated. This method is replaced by ParticipantAccessBean.getInformation()

        Retrieves the information associated with the specified participant

        The SQL statement used to query the PARTICIPNT table is:

        select participnt.member_id, participnt.information, participnt.termcond_id from participnt where participnt.participnt_id = ?

        Parameters:
        aParticipntId - The ID of the participant.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The information associated with the specified participant.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findPolicyDescription

        public java.lang.String findPolicyDescription(java.lang.Long aPolicyId,
                                                      java.lang.Integer aLanguageId)
                                               throws java.sql.SQLException,
                                                      javax.naming.NamingException
        Deprecated. This method is replaced by PolicyDescriptionAccessBean.getLongDescription()

        Retrieves the description associated with the specified policy

        The SQL statement used to query the POLICYDESC table is:

        select policydesc.policy_id, policydesc.longdescription, policydesc.language_id from policydesc where policydesc.policy_id = ? and policydesc.language_id = ?

        Parameters:
        aPolicyId - The ID of the policy.
        aLanguageId - The ID of the language associated with the specified policy.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findPolicyDescription

        public java.lang.String findPolicyDescription(java.lang.Long aPolicyId,
                                                      java.lang.Integer aLanguageId,
                                                      boolean flush)
                                               throws java.sql.SQLException,
                                                      javax.naming.NamingException
        Deprecated. This method is replaced by PolicyDescriptionAccessBean.getLongDescription()

        Retrieves the description associated with the specified policy

        The SQL statement used to query the POLICYDESC table is:

        select policydesc.policy_id, policydesc.longdescription, policydesc.language_id from policydesc where policydesc.policy_id = ? and policydesc.language_id = ?

        Parameters:
        aPolicyId - The ID of the policy.
        aLanguageId - The ID of the language associated with the specified policy.
        flush - The flag indicating whether changes should be committed immediately.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTCDescLongDesc

        public java.lang.String findTCDescLongDesc(java.lang.Long aTermCondId,
                                                   java.lang.Integer aLangId)
                                            throws java.sql.SQLException,
                                                   javax.naming.NamingException
        Deprecated. This method is replaced by TermConditionDescriptionAccessBean.getLongDescription()

        Retrieves the long description of the specified terms and conditions

        The SQL statement used to query the TCDESC table is:

        select tcdesc.termcond_id, tcdesc.longdescription, tcdesc.language_id from tcdesc where tcdesc.termcond_id = ? and tcdesc.language_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        aLangId - The ID of the language associated with the specified terms and conditions description.
        Returns:
        The long description of the specified terms and conditions.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTCDescLongDesc

        public java.lang.String findTCDescLongDesc(java.lang.Long aTermCondId,
                                                   java.lang.Integer aLangId,
                                                   boolean flush)
                                            throws java.sql.SQLException,
                                                   javax.naming.NamingException
        Deprecated. This method is replaced by TermConditionDescriptionAccessBean.getLongDescription()

        Retrieves the long description of the specified terms and conditions

        The SQL statement used to query the TCDESC table is:

        select tcdesc.termcond_id, tcdesc.longdescription, tcdesc.language_id from tcdesc where tcdesc.termcond_id = ? and tcdesc.language_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        aLangId - The ID of the language associated with the specified terms and conditions description.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The long description of the specified terms and conditions.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTRDDescLongDesc

        public java.lang.String findTRDDescLongDesc(java.lang.Long aTermCondId,
                                                    java.lang.Integer aLangId)
                                             throws java.sql.SQLException,
                                                    javax.naming.NamingException
        Deprecated. This method is replaced by TradingDescriptionAccessBean.getLongDescription()

        Retrieves the long description of the specified trading agreement

        The SQL statement used to query the TRDDESC table is:

        select trddesc.trading_id, trddesc.longdescription, trddesc.language_id from trddesc where trddesc.trading_id = ? and trddesc.language_id = ?

        Parameters:
        aTermCondId - The ID of the term condition.
        aLangId - The ID of the language associated with the specified terms and conditions description.
        Returns:
        The long description of the specified trading agreement.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTRDDescLongDesc

        public java.lang.String findTRDDescLongDesc(java.lang.Long aTermCondId,
                                                    java.lang.Integer aLangId,
                                                    boolean flush)
                                             throws java.sql.SQLException,
                                                    javax.naming.NamingException
        Deprecated. This method is replaced by TradingDescriptionAccessBean.getLongDescription()

        Retrieves the long description of the specified trading agreement

        The SQL statement used to query the TRDDESC table is:

        select trddesc.trading_id, trddesc.longdescription, trddesc.language_id from trddesc where trddesc.trading_id = ? and trddesc.language_id = ?

        Parameters:
        aTermCondId - The ID of the term condition.
        aLangId - The ID of the language associated with the specified terms and conditions description.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The long description of the specified trading agreement.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTermCondStringField1

        public java.lang.String findTermCondStringField1(java.lang.Long aTermCondId)
                                                  throws java.sql.SQLException,
                                                         javax.naming.NamingException
        Deprecated. This method is replaced by directly mapping STRINGFIELD1 in the term and condition EJB.

        Retrieves the string field of the terms and conditions table

        The SQL statement used to query the TERMCOND table is:

        select termcond.integerfield1, termcond.stringfield1, termcond.integerfield2 from termcond where termcond.termcond_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        Returns:
        The string field of the terms and conditions table.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • findTermCondStringField1

        public java.lang.String findTermCondStringField1(java.lang.Long aTermCondId,
                                                         boolean flush)
                                                  throws java.sql.SQLException,
                                                         javax.naming.NamingException
        Deprecated. This method is replaced by directly mapping STRINGFIELD1 in the term and condition EJB.

        Retrieves the string field of the terms and conditions table

        The SQL statement used to query the TERMCOND table is:

        select termcond.integerfield1, termcond.stringfield1, termcond.integerfield2 from termcond where termcond.termcond_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The string field of the terms and conditions table.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateContractComments

        public int updateContractComments(java.lang.Long aContractId,
                                          java.lang.String aComments)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by ContractAccessBean.setComments(String)

        Updates the comments field in the contract table

        The SQL statement used to update the CONTRACT table is:

        update contract set comments = ? where contract.contract_id = ?

        Parameters:
        aContractId - The ID of the contract.
        aComments - The comments of the contract.
        Returns:
        The number of rows in the contract table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateContractComments

        public int updateContractComments(java.lang.Long aContractId,
                                          java.lang.String aComments,
                                          boolean flush)
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
        Deprecated. This method is replaced by ContractAccessBean.setComments(String)

        Updates the comments field in the contract table

        The SQL statement used to update the CONTRACT table is:

        update contract set comments = ? where contract.contract_id = ?

        Parameters:
        aContractId - The ID of the contract.
        aComments - The comments of the contract.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows in the contract table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateParticipntInfo

        public int updateParticipntInfo(java.lang.Long aParticipntId,
                                        java.lang.String aStringField1)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException
        Deprecated. This method is replaced by ParticipantAccessBean.setInformation(String)

        Updates the information field in the participnt table

        The SQL statement used to update the PARTICIPNT table is:

        update participnt set information = ? where participnt.participnt_id = ?

        Parameters:
        aParticipntId - The ID of the participant.
        aStringField1 - The information associated with the participant.
        Returns:
        The number of rows in the participant table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateParticipntInfo

        public int updateParticipntInfo(java.lang.Long aParticipntId,
                                        java.lang.String aParticipntInfo,
                                        boolean flush)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException
        Deprecated. This method is replaced by ParticipantAccessBean.setInformation(String)

        Updates the information field in the participnt table

        The SQL statement used to update the PARTICIPNT table is:

        update participnt set information = ? where participnt.participnt_id = ?

        Parameters:
        aParticipntId - The ID of the participant.
        aStringField1 - The information associated with the participant.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows in the participant table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updatePolicyDescription

        public int updatePolicyDescription(java.lang.Long aPolicyId,
                                           java.lang.Integer aLanguageId,
                                           java.lang.String aDescription)
                                    throws java.sql.SQLException,
                                           javax.naming.NamingException
        Deprecated. This method is replaced by PolicyDescriptionAccessBean.setLongDescription(String)

        Updates the long description field in the policy description table

        The SQL statement used to update the POLICYDESC table is:

        update policydesc set longdescription = ? where policydesc.policy_id = ? and policydesc.language_id = ?

        Parameters:
        aPolicyId - The ID of the policy.
        aLanguageId - The ID of the language associated with the policy description.
        aDescription - The description of the policy.
        Returns:
        The number of rows in the policy description table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updatePolicyDescription

        public int updatePolicyDescription(java.lang.Long aPolicyId,
                                           java.lang.Integer aLanguageId,
                                           java.lang.String aDescription,
                                           boolean flush)
                                    throws java.sql.SQLException,
                                           javax.naming.NamingException
        Deprecated. This method is replaced by PolicyDescriptionAccessBean.setLongDescription(String)

        Updates the long description field in the policy description table

        The SQL statement used to update the POLICYDESC table is:

        update policydesc set longdescription = ? where policydesc.policy_id = ? and policydesc.language_id = ?

        Parameters:
        aPolicyId - The ID of the policy.
        aLanguageId - The ID of the language associated with the policy description.
        aDescription - The description of the policy.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows in the policy description table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTCDescLongDesc

        public int updateTCDescLongDesc(java.lang.Long aTermCondId,
                                        java.lang.Integer aLangId,
                                        java.lang.String aDescription)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException

        Updates the long description field in the terms and conditions description table

        The SQL statement used to update the TCDESC table is:

        update tcdesc set tcdesc.longdescription = ? where tcdesc.termcond_id = ? and tcdesc.language_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        aLangId - The ID of the language associated with the terms and conditions description.
        aDescription - The description of the terms and conditions.
        Returns:
        The number of rows in the terms and conditions description table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTCDescLongDesc

        public int updateTCDescLongDesc(java.lang.Long aTermCondId,
                                        java.lang.Integer aLangId,
                                        java.lang.String aDescription,
                                        boolean flush)
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException

        Updates the long description field in the terms and conditions description table

        The SQL statement used to update the TCDESC table is:

        update tcdesc set tcdesc.longdescription = ? where tcdesc.termcond_id = ? and tcdesc.language_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        aLangId - The ID of the language associated with the terms and conditions description.
        aDescription - The description of the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows in the terms and conditions description table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTRDDescLongDesc

        public int updateTRDDescLongDesc(java.lang.Long aTradingId,
                                         java.lang.Integer aLangId,
                                         java.lang.String aDescription)
                                  throws java.sql.SQLException,
                                         javax.naming.NamingException
        Deprecated. This method is replaced by TradingDescriptionAccessBean.setLongDescription(String)

        Updates the long description field in the trading description table

        The SQL statement used to update the TRDDESC table is:

        update trddesc set trddesc.longdescription = ? where trddesc.trading_id = ? and trddesc.language_id = ?

        Parameters:
        aTradingId - The ID of the trading agreement.
        aLangId - The ID of the language associated with the trading description.
        aDescription - The description of the trading agreement.
        Returns:
        The number of rows in the trading description table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTRDDescLongDesc

        public int updateTRDDescLongDesc(java.lang.Long aTradingId,
                                         java.lang.Integer aLangId,
                                         java.lang.String aDescription,
                                         boolean flush)
                                  throws java.sql.SQLException,
                                         javax.naming.NamingException
        Deprecated. This method is replaced by TradingDescriptionAccessBean.setLongDescription(String)

        Updates the long description field in the trading description table

        The SQL statement used to update the TRDDESC table is:

        update trddesc set trddesc.longdescription = ? where trddesc.trading_id = ? and trddesc.language_id = ?

        Parameters:
        aTradingId - The ID of the trading agreement.
        aLangId - The ID of the language associated with the trading description.
        aDescription - The description of the trading agreement.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows in the trading description table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTermCondStringField1

        public int updateTermCondStringField1(java.lang.Long aTermCondId,
                                              java.lang.String aStringField1)
                                       throws java.sql.SQLException,
                                              javax.naming.NamingException
        Deprecated. This method is replaced by directly mapping STRINGFIELD1 in the term and condition EJB.

        Updates the string field in the terms and conditions table

        The SQL statement used to update the TERMCOND table is:

        update termcond set termcond.stringfield1 = ? where termcond.termcond_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        aStringField1 - The string field associated with the terms and conditions.
        Returns:
        The number of rows in the terms and conditions table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.
      • updateTermCondStringField1

        public int updateTermCondStringField1(java.lang.Long aTermCondId,
                                              java.lang.String aStringField1,
                                              boolean flush)
                                       throws java.sql.SQLException,
                                              javax.naming.NamingException
        Deprecated. This method is replaced by directly mapping STRINGFIELD1 in the term and condition EJB.

        Updates the string field in the terms and conditions table

        The SQL statement used to update the TERMCOND table is:

        update termcond set termcond.stringfield1 = ? where termcond.termcond_id = ?

        Parameters:
        aTermCondId - The ID of the terms and conditions.
        aStringField1 - The string field associated with the terms and conditions.
        flush - The flag indicating whether changes should be committed immediately.
        Returns:
        The number of rows in the terms and conditions table after the entry has updated.
        Throws:
        javax.naming.NamingException - The javax.naming.NamingException exception.
        java.sql.SQLException - The java.sql.SQLException exception.