com.ibm.commerce.contract.objimpl
Class ContractJDBCHelperBeanBase

java.lang.Object
  |
  +--com.ibm.commerce.base.helpers.BaseJDBCHelper
        |
        +--com.ibm.commerce.contract.objimpl.ContractJDBCHelperBeanBase
Direct Known Subclasses:
ContractJDBCHelperBean

public class ContractJDBCHelperBeanBase
extends BaseJDBCHelper

Provides helper methods to perform various SQL actions on the database.


Field Summary
static java.lang.String addProductSetAdjustmentSQL
           
static java.lang.String addTCAttributeXMLSQL
           
static java.lang.String addTPCXMLDefSQL
           
static java.lang.String COPYRIGHT
          Copyright statement
static java.lang.String deleteProductSetAdjustmentSQL
           
static java.lang.String deleteTCAttributeXMLSQL
           
static java.lang.String deleteXMLDefByTPCSQL
           
static java.lang.String emptyContractStoreXMLSQL
           
static java.lang.String emptyTCAttributeXMLSQL
           
static java.lang.String findActiveContractsDeployedInStoreSQL
           
static java.lang.String findAllTCAttributeXMLSQL
           
static java.lang.String findContractCommentsSQL
           
static java.lang.String findContractStoreXMLForUpdateSQL
           
static java.lang.String findContractStoreXMLSQL
           
static java.lang.String findExclusionProductSetIdsByTCIdAndTypeSQL
           
static java.lang.String findInclusionProductSetIdsByTCIdAndTypeSQL
           
static java.lang.String findLargestSequenceInTCAttributeSQL
           
static java.lang.String findParticipntInformationSQL
           
static java.lang.String findPolicyDescriptionSQL
           
static java.lang.String findProductSetAdjustmentsSQL
           
static java.lang.String findProductSetIdsByTCIdAndTypeSQL
           
static java.lang.String findSameFamilyContractsSQL
           
static java.lang.String findSequenceInTCAttributeSQL
           
static java.lang.String findStoreIdsInStoreContractByContractIdSQL
           
static java.lang.String findTCAttributeXMLForUpdateSQL
           
static java.lang.String findTCDescLongDescSQL
           
static java.lang.String findTCIdInTCAttributeByTradingIdAndTypeSQL
           
static java.lang.String findTCIdInTCAttributeByTradingIdTCIdAndTypeSQL
           
static java.lang.String findTermCondStringField1SQL
           
static java.lang.String findTRDDescLongDescSQL
           
static java.lang.String findXMLDefByTPCSQL
           
protected  javax.ejb.SessionContext mySessionCtx
           
static java.lang.String updateContractCommentsSQL
           
static java.lang.String updateContractStoreXMLSQL
           
static java.lang.String updateParticipntInfoSQL
           
static java.lang.String updatePolicyDescriptionSQL
           
static java.lang.String updateProductSetAdjustmentSQL
           
static java.lang.String updateTCAttributeXMLSQL
           
static java.lang.String updateTCDescLongDescSQL
           
static java.lang.String updateTermCondStringField1SQL
           
static java.lang.String updateTRDDescLongDescSQL
           
 
Fields inherited from class com.ibm.commerce.base.helpers. BaseJDBCHelper
autoFlush, DATASOURCE, dataSourceConfigData, DB_DB2, DB_DB2_390, DB_DB2J, DB_ORACLE, DBTYPE
 
Constructor Summary
ContractJDBCHelperBeanBase()
           
 
Method Summary
 int addContractStoreXML(java.lang.Long argContractId, java.lang.String argStoreXML)
          Inserts the XML in the Contract Store table associated with the specified contract ID.
 int addEntryToContractName(java.lang.String argName, java.lang.Long argMemberId, java.lang.Integer argOrigin)
          Adds an entry to the contract name table.
 int addEntryToContractName(java.lang.String argName, java.lang.Long argMemberId, java.lang.Integer argOrigin, boolean flush)
          Adds an entry to the contract name table.
 int addPolicyTC(java.lang.Long argPolicyId, java.lang.Long argTCId)
          Adds an entry to the policy terms and conditions table.
 int addProductSetAdjustment(java.lang.Long termcondId, java.lang.Integer productsetId, java.lang.Double adjustment, java.lang.Integer precedence, java.lang.Integer type)
          Inserts a product set adjustment row into the PSETADJMNT table.
 int addProductSetAdjustment(java.lang.Long termcondId, java.lang.Integer productsetId, java.lang.Double adjustment, java.lang.Integer precedence, java.lang.Integer type, boolean flush)
          Inserts a product set adjustment row into the PSETADJMNT table.
 int addStoreContract(java.lang.Long argStoreId, java.lang.Long argContractId)
          Adds an entry to the store contract table.
 int addTCAttributeXML(java.lang.Long argTermCondId, java.lang.Long argTradingId, java.lang.Integer argType, java.lang.String argXMLDefinition, java.lang.Integer argSequence)
          Inserts the XML definition into the TCATTR table.
 int addTPCXMLDefinition(java.lang.Long argTradingPositionContainerId, java.util.Vector argXMLDefVec)
          Adds an entry to the trading position container xml table.
 int addTPCXMLDefinition(java.lang.Long argTradingPositionContainerId, java.util.Vector argXMLDefVec, boolean flush)
          Adds an entry to the trading position container xml table.
 int deleteContractStoreXML(java.lang.Long contractId)
          Deletes a row from the Contract Store table associated with the specified contract ID.
 int deleteContractStoreXML(java.lang.Long contractId, boolean flush)
          Deletes a row from the Contract Store table associated with the specified contract ID.
 int deleteEntryFromContractName(java.lang.String argName, java.lang.Long argMemberId, java.lang.Integer argOrigin)
          Deletes an entry from the contract name table.
 int deleteEntryFromContractName(java.lang.String argName, java.lang.Long argMemberId, java.lang.Integer argOrigin, boolean flush)
          Deletes an entry from the contract name table.
 int deletePolicyTC(java.lang.Long argPolicyId, java.lang.Long argTCId)
          Deletes an entry from the policy terms and conditions table.
 int deletePolicyTCByTC(java.lang.Long argTCId)
          Deletes an entry from the policy terms and conditions table
 int deleteProductSetAdjustment(java.lang.Long termcondId, java.lang.Integer productsetId)
          Deletes a product set adjustment row from the PSETADJMNT table.
 int deleteProductSetAdjustment(java.lang.Long termcondId, java.lang.Integer productsetId, boolean flush)
          Deletes a product set adjustment row from the PSETADJMNT table.
 int deleteStoreContract(java.lang.Long argStoreId, java.lang.Long argContractId)
          Deletes an entry from the store contract table
 int deleteTCAttributeXML(java.lang.Long argTermCondId, java.lang.Integer argType, java.lang.Integer argSequence)
          Deletes a row from the TCATTR table.
 int deleteTCAttributeXML(java.lang.Long argTermCondId, java.lang.Integer argType, java.lang.Integer argSequence, boolean flush)
          Deletes a row from the TCATTR table.
 int deleteXMLDefByTPC(java.lang.Long argTPCId)
          Deletes an entry from the trading position container xml table
 int deleteXMLDefByTPC(java.lang.Long argTPCId, boolean flush)
          Deletes an entry from the trading position container xml table
 void ejbActivate()
          Activates the EJB
 void ejbPassivate()
          Passivates the EJB
 void ejbRemove()
          Removes the EJB
 java.util.Vector findActiveContractsDeployedInStore(java.lang.Integer storeId)
          Retrieves the contracts in active state that are deployed in the specified store.
 java.util.Vector findActiveContractsDeployedInStore(java.lang.Integer storeId, boolean flush)
          Retrieves the contracts in active state that are deployed in the specified store.
 java.util.Vector findAllBusinessCmdClassNameForPolicy(java.lang.Long argPolicyId)
          Retrieves the names of all the business command classes associated with the specified policy
 java.util.Vector findAllBusinessCmdClassNameForPolicy(java.lang.Long argPolicyId, boolean flush)
          Retrieves the names of all the business command classes associated with the specified policy
 java.util.Vector findAllBusinessCmdInterfaceNameByPolicyType(java.lang.String argPolicyType)
          Retrieves the names of all the business command interfaces associated with the specified policy
 java.util.Vector findAllBusinessCmdInterfaceNameByPolicyType(java.lang.String argPolicyType, boolean flush)
          Retrieves the names of all the business command interfaces associated with the specified policy
 java.util.Vector findAllBusinessPolicyType()
          Retrieves all the policy types from the POLICYTYPE table.
 java.util.Vector findAllBusinessPolicyType(boolean flush)
          Retrieves all the policy types from the POLICYTYPE table.
 java.util.Vector findAllTCAttributeXML(java.lang.Long argTermCondId, java.lang.Integer argType)
          Finds all the term condition attribute XML matching the specified term condition ID and type.
 java.util.Vector findAllTCAttributeXML(java.lang.Long argTermCondId, java.lang.Integer argType, boolean flush)
          Finds all the term condition attribute XML matching the specified term condition ID and type.
 java.util.Vector findAllTCSubType()
          Retrieves all the term condition subtypes from the TCSUBTYPE table.
 java.util.Vector findAllTCSubType(boolean flush)
          Retrieves all the term condition subtypes from the TCSUBTYPE table.
 java.lang.String findContractComments(java.lang.Long aContractId)
          Retrieves the comments associated with the specified contract
 java.lang.String findContractComments(java.lang.Long aContractId, boolean flush)
          Retrieves the comments associated with the specified contract
 java.util.Vector findContractListInOrderByAccount(java.lang.Long argAccountId, java.lang.String argOrderByColumn)
          Retrieves all contracts associated with the specified account ID
 java.util.Vector findContractListInOrderByAccount(java.lang.Long argAccountId, java.lang.String argOrderByColumn, boolean flush)
          Retrieves all contracts associated with the specified account ID
 java.util.Vector findContractListInOrderByAccountAndState(java.lang.Long argAccountId, java.lang.Integer argState, java.lang.String argOrderByColumn)
          Retrieves all contracts associated with the specified account ID and state
 java.util.Vector findContractListInOrderByAccountAndState(java.lang.Long argAccountId, java.lang.Integer argState, java.lang.String argOrderByColumn, boolean flush)
          Retrieves all contracts associated with the specified account ID and state
 java.lang.String findContractStoreXML(java.lang.Long argContractId)
          Finds the XML in the Contract Store table associated with the specified contract ID.
 java.lang.String findContractStoreXML(java.lang.Long argContractId, boolean flush)
          Finds the XML in the Contract Store table associated with the specified contract ID.
 java.util.Vector findExclusionProductSetIdsByTCIdAndType(java.lang.Long TCId)
          Finds all the exclusion product sets.
 java.util.Vector findExclusionProductSetIdsByTCIdAndType(java.lang.Long TCId, boolean flush)
          Finds all the exclusion product sets.
 java.util.Vector findInclusionProductSetIdsByTCIdAndType(java.lang.Long TCId)
          Finds all the inclusion product sets.
 java.util.Vector findInclusionProductSetIdsByTCIdAndType(java.lang.Long TCId, boolean flush)
          Finds all the inclusion product sets.
 java.lang.String findParticipntInformation(java.lang.Long aParticipntId)
          Retrieves the information associated with the specified participant
 java.lang.String findParticipntInformation(java.lang.Long aParticipntId, boolean flush)
          Retrieves the information associated with the specified participant
 PAttrValueAccessBean[] findPAttrValueByTCIdOrderByPAttribute(java.lang.Long argTCId)
          Retrieves an array of PAttrValueAccessBean objects with the specified term condition ID
 PAttrValueAccessBean[] findPAttrValueByTCIdOrderByPAttribute(java.lang.Long argTCId, boolean flush)
          Retrieves an array of PAttrValueAccessBean objects with the specified term condition ID
 java.lang.String findPolicyDescription(java.lang.Long aPolicyId, java.lang.Integer aLanguageId)
          Retrieves the description associated with the specified policy
 java.lang.String findPolicyDescription(java.lang.Long aPolicyId, java.lang.Integer aLanguageId, boolean flush)
          Retrieves the description associated with the specified policy
 java.util.Vector findProductSetAdjustments(java.lang.Long termcondId)
          Finds all the product set adjustments matching the specified term condition ID.
 java.util.Vector findProductSetAdjustments(java.lang.Long termcondId, boolean flush)
          Finds all the product set adjustments matching the specified term condition ID.
 java.lang.Integer[] findProductSetIdsByTCIdAndType(java.lang.Long termcondId, java.lang.Integer type)
          Finds all the product sets in the product set adjustment table matching the specified term condition ID and type.
 java.lang.Integer[] findProductSetIdsByTCIdAndType(java.lang.Long termcondId, java.lang.Integer type, boolean flush)
          Finds all the product sets in the product set adjustment table matching the specified term condition ID and type.
 java.lang.Long[] findSameFamilyContracts(java.lang.String name, java.lang.Long ownerId, java.lang.Integer origin, java.lang.Long contractId)
          Finds all the contracts with the same name, owner, origin, and contract ID.
 java.lang.Long[] findSameFamilyContracts(java.lang.String name, java.lang.Long ownerId, java.lang.Integer origin, java.lang.Long contractId, boolean flush)
          Finds all the contracts with the same name, owner, origin, and contract ID.
 java.lang.Integer[] findStoreIdsInStoreContractByContractId(java.lang.Long contractId)
          Finds all the stores in the store contract table matching the specified contract ID.
 java.lang.Integer[] findStoreIdsInStoreContractByContractId(java.lang.Long contractId, boolean flush)
          Finds all the stores in the store contract table matching the specified contract ID.
 java.lang.String findTCDescLongDesc(java.lang.Long aTermCondId, java.lang.Integer aLangId)
          Retrieves the long description of the specified terms and conditions
 java.lang.String findTCDescLongDesc(java.lang.Long aTermCondId, java.lang.Integer aLangId, boolean flush)
          Retrieves the long description of the specified terms and conditions
 java.util.Vector findTCIdInTCAttributeByTradingIdAndType(java.lang.Long tradingId, java.lang.Integer type)
          Finds all the terms and conditions in the TCATTR table matching the specified trading agreement ID and type.
 java.util.Vector findTCIdInTCAttributeByTradingIdAndType(java.lang.Long tradingId, java.lang.Integer type, boolean flush)
          Finds all the terms and conditions in the TCATTR table matching the specified trading agreement ID and type.
 java.lang.String findTermCondStringField1(java.lang.Long aTermCondId)
          Retrieves the string field of the terms and conditions table
 java.lang.String findTermCondStringField1(java.lang.Long aTermCondId, boolean flush)
          Retrieves the string field of the terms and conditions table
 java.lang.String findTRDDescLongDesc(java.lang.Long aTermCondId, java.lang.Integer aLangId)
          Retrieves the long description of the specified trading agreement
 java.lang.String findTRDDescLongDesc(java.lang.Long aTermCondId, java.lang.Integer aLangId, boolean flush)
          Retrieves the long description of the specified trading agreement
 java.lang.String findXMLDefByTPC(java.lang.Long argTPCId)
          Retrieves the XML definition of the trading position container
 java.lang.String findXMLDefByTPC(java.lang.Long argTPCId, boolean flush)
          Retrieves the XML definition of the trading position container
 int getLargestSequenceInTCAttribute(java.lang.Long termcondId, java.lang.Integer type)
          Finds the largest sequence in the TCATTR table matching the specified term condition ID and type.
 int getLargestSequenceInTCAttribute(java.lang.Long termcondId, java.lang.Integer type, boolean flush)
          Finds the largest sequence in the TCATTR table matching the specified term condition ID and type.
 int getLargestTCSequenceByTrading(java.lang.Long argTradingId)
          Retrieves the largest terms and conditions sequence number with the specified trading ID
 int getLargestTCSequenceByTrading(java.lang.Long argTradingId, boolean flush)
          Retrieves the largest terms and conditions sequence number with the specified trading ID
 javax.ejb.SessionContext getSessionContext()
          Returns this session's context.
 java.lang.String getTCAccessBeanNameBySubType(java.lang.String argTCSubType)
          Retrieves the name of the terms and conditions access bean by the specified subtype
 java.lang.String getTCAccessBeanNameBySubType(java.lang.String argTCSubType, boolean flush)
          Retrieves the name of the terms and conditions access bean by the specified subtype
 java.lang.String getTCAccessBeanNameByTC(java.lang.Long argTCId)
          Retrieves the name of the terms and conditions access bean by the specified terms and conditions ID
 java.lang.String getTCAccessBeanNameByTC(java.lang.Long argTCId, boolean flush)
          Retrieves the name of the terms and conditions access bean by the specified terms and conditions ID
 java.lang.String getTCDeployCmdBySubType(java.lang.String argTCSubType)
          Retrieves the deploy command associated with the terms and conditions subtype
 java.lang.String getTCDeployCmdBySubType(java.lang.String argTCSubType, boolean flush)
          Retrieves the deploy command associated with the terms and conditions subtype
 java.lang.String getTCDeployCmdByTC(java.lang.Long argTCId)
          Retrieves the deploy command associated with the terms and conditions ID
 java.lang.String getTCDeployCmdByTC(java.lang.Long argTCId, boolean flush)
          Retrieves the deploy command associated with the terms and conditions ID
 java.lang.String queryContractName(java.lang.String argName, java.lang.Long argMemberId, java.lang.Integer argOrigin)
          Retrieves the name of the contract associated with the specified member ID and origin
 java.lang.String queryContractName(java.lang.String argName, java.lang.Long argMemberId, java.lang.Integer argOrigin, boolean flush)
          Retrieves the name of the contract associated with the specified member ID and origin
 boolean queryStoreContract(java.lang.Integer argStoreId, java.lang.Long argContractId)
          Queries whether a particular contract exists for a specified store
 boolean queryStoreContract(java.lang.Integer argStoreId, java.lang.Long argContractId, boolean flush)
          Queries whether a particular contract exists for a specified store
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets this session's context.
 int updateContractComments(java.lang.Long aContractId, java.lang.String aComments)
          Updates the comments field in the contract table
 int updateContractComments(java.lang.Long aContractId, java.lang.String aComments, boolean flush)
          Updates the comments field in the contract table
 int updateContractStoreXML(java.lang.Long argContractId, java.lang.String argStoreXML)
          Updates the XML in the Contract Store table associated with the specified contract ID.
 int updateContractStoreXML(java.lang.Long argContractId, java.lang.String argStoreXML, boolean flush)
          Updates the XML in the Contract Store table associated with the specified contract ID.
 int updateParticipntInfo(java.lang.Long aParticipntId, java.lang.String aStringField1)
          Updates the information field in the participant table
 int updateParticipntInfo(java.lang.Long aParticipntId, java.lang.String aParticipntInfo, boolean flush)
          Updates the information field in the participant table
 int updatePolicyDescription(java.lang.Long aPolicyId, java.lang.Integer aLanguageId, java.lang.String aDescription)
          Updates the long description field in the policy description table
 int updatePolicyDescription(java.lang.Long aPolicyId, java.lang.Integer aLanguageId, java.lang.String aDescription, boolean flush)
          Updates the long description field in the policy description table
 int updateProductSetAdjustment(java.lang.Long termcondId, java.lang.Integer productsetId, java.lang.Double adjustment, java.lang.Integer precedence, java.lang.Integer type)
          Updates a product set adjustment row in the PSETADJMNT table.
 int updateProductSetAdjustment(java.lang.Long termcondId, java.lang.Integer productsetId, java.lang.Double adjustment, java.lang.Integer precedence, java.lang.Integer type, boolean flush)
          Updates a product set adjustment row in the PSETADJMNT table.
 int updateTCAttributeXML(java.lang.Long argTermCondId, java.lang.Long argTradingId, java.lang.Integer argType, java.lang.String argXMLDefinition, java.lang.Integer argSequence)
          Updates the term condition attribute XML in the TCATTR table.
 int updateTCAttributeXML(java.lang.Long argTermCondId, java.lang.Long argTradingId, java.lang.Integer argType, java.lang.String argXMLDefinition, java.lang.Integer argSequence, boolean flush)
          Updates the term condition attribute XML in the TCATTR table.
 int updateTCDescLongDesc(java.lang.Long aTermCondId, java.lang.Integer aLangId, java.lang.String aDescription)
          Updates the long description field in the terms and conditions description table
 int updateTCDescLongDesc(java.lang.Long aTermCondId, java.lang.Integer aLangId, java.lang.String aDescription, boolean flush)
          Updates the long description field in the terms and conditions description table
 int updateTermCondStringField1(java.lang.Long aTermCondId, java.lang.String aStringField1)
          Updates the string field in the terms and conditions table
 int updateTermCondStringField1(java.lang.Long aTermCondId, java.lang.String aStringField1, boolean flush)
          Updates the string field in the terms and conditions table
 int updateTRDDescLongDesc(java.lang.Long aTradingId, java.lang.Integer aLangId, java.lang.String aDescription)
          Updates the long description field in the trading description table
 int updateTRDDescLongDesc(java.lang.Long aTradingId, java.lang.Integer aLangId, java.lang.String aDescription, boolean flush)
          Updates the long description field in the trading description table
 
Methods inherited from class com.ibm.commerce.base.helpers. BaseJDBCHelper
buildCommaSeparatedWhereClause, closeConnection, convertFirstRowToHashtable, convertResultSetToTable, convertRowFromHashtable, debugInitConnection, executeQuery, executeUpdate, flush, getCallableStatement, getCharacterStreamFromResultSet, getConnection, getDataSource, getPreparedStatement, getPreparedStatement, init, init, makeConnection, useCloudscape, useDB2_390, useDB2, useOracle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright statement
See Also:
Constant Field Values

mySessionCtx

protected javax.ejb.SessionContext mySessionCtx

findPolicyDescriptionSQL

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

findContractCommentsSQL

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

updatePolicyDescriptionSQL

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

updateParticipntInfoSQL

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

updateContractCommentsSQL

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

findTermCondStringField1SQL

public static final java.lang.String findTermCondStringField1SQL
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

findParticipntInformationSQL

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

updateTermCondStringField1SQL

public static final java.lang.String updateTermCondStringField1SQL
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

addTPCXMLDefSQL

public static final java.lang.String addTPCXMLDefSQL
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

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

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
Constructor Detail

ContractJDBCHelperBeanBase

public ContractJDBCHelperBeanBase()
Method Detail

addEntryToContractName

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

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 javax.naming.NamingException,
                                  java.sql.SQLException

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 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.

addPolicyTC

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

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 in the policy terms and conditions 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.

addStoreContract

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

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 in the store contract 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.

addTPCXMLDefinition

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

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 in the trading position container xml 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.

addTPCXMLDefinition

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

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 in the trading position container xml 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.

deleteEntryFromContractName

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

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 in the contract name table after the entry has been 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 javax.naming.NamingException,
                                       java.sql.SQLException

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 in the contract name table after the entry has been 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 javax.naming.NamingException,
                          java.sql.SQLException

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 in the policy terms and conditions table after the entry has been deleted.
Throws:
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException - The java.sql.SQLException exception.

deletePolicyTCByTC

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

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 termcond_id= ?

Parameters:
argTCId - The ID of the terms and conditions.
Returns:
The number of rows in the policy terms and conditions table after the entry has been 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 javax.naming.NamingException,
                               java.sql.SQLException

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 in the store contract table after the entry has been 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)
                      throws javax.naming.NamingException,
                             java.sql.SQLException

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 in the trading position container xml table after the entry has been 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 javax.naming.NamingException,
                             java.sql.SQLException

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.
flush - The flag indicating whether changes should be committed immediately.
Returns:
The number of rows in the trading position container xml table after the entry has been deleted.
Throws:
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException - The java.sql.SQLException exception.

ejbActivate

public void ejbActivate()
Activates the EJB

ejbPassivate

public void ejbPassivate()
Passivates the EJB

ejbRemove

public void ejbRemove()
Removes the EJB

findAllBusinessCmdClassNameForPolicy

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

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 javax.naming.NamingException,
                                                             java.sql.SQLException

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 javax.naming.NamingException,
                                                                    java.sql.SQLException

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 javax.naming.NamingException,
                                                                    java.sql.SQLException

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 javax.naming.NamingException,
                                                  java.sql.SQLException

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 javax.naming.NamingException,
                                                  java.sql.SQLException

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 javax.naming.NamingException,
                                         java.sql.SQLException

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 javax.naming.NamingException,
                                         java.sql.SQLException

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.

findContractComments

public java.lang.String findContractComments(java.lang.Long aContractId)
                                      throws javax.naming.NamingException,
                                             java.sql.SQLException

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 javax.naming.NamingException,
                                             java.sql.SQLException

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.

findContractListInOrderByAccount

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

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 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

Parameters:
argAccountId - The ID of the account.
argOrderByColumn - The order by which to display the result.
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 javax.naming.NamingException,
                                                         java.sql.SQLException

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 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

Parameters:
argAccountId - The ID of the account.
argOrderByColumn - The order by which to display the result.
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 javax.naming.NamingException,
                                                                 java.sql.SQLException

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 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

Parameters:
argAccountId - The ID of the account.
argState - The state of the contract.
argOrderByColumn - The order by which to display the result.
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 javax.naming.NamingException,
                                                                 java.sql.SQLException

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 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

Parameters:
argAccountId - The ID of the account.
argState - The state of the contract.
argOrderByColumn - The order by which to display the result.
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.

findParticipntInformation

public java.lang.String findParticipntInformation(java.lang.Long aParticipntId)
                                           throws javax.naming.NamingException,
                                                  java.sql.SQLException

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.
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 javax.naming.NamingException,
                                                  java.sql.SQLException

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.

findPAttrValueByTCIdOrderByPAttribute

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

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 javax.naming.NamingException,
                                                                    java.sql.SQLException

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.

findPolicyDescription

public java.lang.String findPolicyDescription(java.lang.Long aPolicyId,
                                              java.lang.Integer aLanguageId)
                                       throws javax.naming.NamingException,
                                              java.sql.SQLException

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 javax.naming.NamingException,
                                              java.sql.SQLException

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 javax.naming.NamingException,
                                           java.sql.SQLException

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 javax.naming.NamingException,
                                           java.sql.SQLException

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.

findTermCondStringField1

public java.lang.String findTermCondStringField1(java.lang.Long aTermCondId)
                                          throws javax.naming.NamingException,
                                                 java.sql.SQLException

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 javax.naming.NamingException,
                                                 java.sql.SQLException

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.

findTRDDescLongDesc

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

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 javax.naming.NamingException,
                                            java.sql.SQLException

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.

findXMLDefByTPC

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

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 javax.naming.NamingException,
                                        java.sql.SQLException

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 javax.naming.NamingException,
                                         java.sql.SQLException

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 javax.naming.NamingException,
                                         java.sql.SQLException

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.

getSessionContext

public javax.ejb.SessionContext getSessionContext()
Returns this session's context.
Specified by:
getSessionContext in class BaseJDBCHelper
Returns:
The SessionContext object.

getTCAccessBeanNameBySubType

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

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 javax.naming.NamingException,
                                                     java.sql.SQLException

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 javax.naming.NamingException,
                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                java.sql.SQLException

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 javax.naming.NamingException,
                                           java.sql.SQLException

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 javax.naming.NamingException,
                                           java.sql.SQLException

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 javax.naming.NamingException,
                                          java.sql.SQLException

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 = ? 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 javax.naming.NamingException,
                                          java.sql.SQLException

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 = ? 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 javax.naming.NamingException,
                                  java.sql.SQLException

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 javax.naming.NamingException,
                                  java.sql.SQLException

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.

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Sets this session's context.
Parameters:
ctx - This session's context.

updateContractComments

public int updateContractComments(java.lang.Long aContractId,
                                  java.lang.String aComments)
                           throws javax.naming.NamingException,
                                  java.sql.SQLException

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 javax.naming.NamingException,
                                  java.sql.SQLException

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 javax.naming.NamingException,
                                java.sql.SQLException

Updates the information field in the participant 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 javax.naming.NamingException,
                                java.sql.SQLException

Updates the information field in the participant 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.
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 javax.naming.NamingException,
                                   java.sql.SQLException

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 javax.naming.NamingException,
                                   java.sql.SQLException

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 javax.naming.NamingException,
                                java.sql.SQLException

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 javax.naming.NamingException,
                                java.sql.SQLException

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.

updateTermCondStringField1

public int updateTermCondStringField1(java.lang.Long aTermCondId,
                                      java.lang.String aStringField1)
                               throws javax.naming.NamingException,
                                      java.sql.SQLException

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 javax.naming.NamingException,
                                      java.sql.SQLException

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.

updateTRDDescLongDesc

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

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 javax.naming.NamingException,
                                 java.sql.SQLException

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.

findContractStoreXML

public java.lang.String findContractStoreXML(java.lang.Long argContractId)
                                      throws javax.naming.NamingException,
                                             java.sql.SQLException

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 = ?

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 javax.naming.NamingException,
                                             java.sql.SQLException

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:
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 javax.naming.NamingException,
                                  java.sql.SQLException

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:
argStoreXML - The store XML.
Returns:
The number of rows in the store contract table after the entry has 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 javax.naming.NamingException,
                                  java.sql.SQLException

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:
argStoreXML - The store XML.
flush - The flag indicating whether changes should be committed immediately.
Returns:
The number of rows in the store contract table after the entry has 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 javax.naming.NamingException,
                               java.sql.SQLException

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:
argStoreXML - The store XML.
Returns:
The number of rows in the store contract table after the entry has 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 javax.naming.NamingException,
                                  java.sql.SQLException

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 = ?

Returns:
The number of rows in the store contract table after the entry has 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 javax.naming.NamingException,
                                  java.sql.SQLException

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:
flush - The flag indicating whether changes should be committed immediately.
Returns:
The number of rows in the store contract table after the entry has 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 javax.naming.NamingException,
                                                           java.sql.SQLException

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 javax.naming.NamingException,
                                                           java.sql.SQLException

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 javax.naming.NamingException,
                             java.sql.SQLException

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 in the TCATTR table after the entry has been 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 javax.naming.NamingException,
                                java.sql.SQLException

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 in the TCATTR table after the entry has been 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 javax.naming.NamingException,
                                java.sql.SQLException

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 in the TCATTR table after the entry has been 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 javax.naming.NamingException,
                                              java.sql.SQLException

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 javax.naming.NamingException,
                                              java.sql.SQLException

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 javax.naming.NamingException,
                                java.sql.SQLException

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 in the TCATTR table after the entry has been 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 javax.naming.NamingException,
                                java.sql.SQLException

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 in the TCATTR table after the entry has been 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 javax.naming.NamingException,
                                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                                java.sql.SQLException

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.
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 javax.naming.NamingException,
                                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                                   java.sql.SQLException

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 javax.naming.NamingException,
                                                                   java.sql.SQLException

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 javax.naming.NamingException,
                                   java.sql.SQLException

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 in the PSETADJMNT table after the entry has been 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 javax.naming.NamingException,
                                   java.sql.SQLException

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 in the PSETADJMNT table after the entry has been 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 javax.naming.NamingException,
                                      java.sql.SQLException

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 in the PSETADJMNT table after the entry has been 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 javax.naming.NamingException,
                                      java.sql.SQLException

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 in the PSETADJMNT table after the entry has been 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 javax.naming.NamingException,
                                      java.sql.SQLException

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 in the PSETADJMNT table after the entry has been 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 javax.naming.NamingException,
                                      java.sql.SQLException

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 in the PSETADJMNT table after the entry has been 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 javax.naming.NamingException,
                                                          java.sql.SQLException

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 javax.naming.NamingException,
                                                          java.sql.SQLException

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 javax.naming.NamingException,
                                           java.sql.SQLException

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 javax.naming.NamingException,
                                           java.sql.SQLException

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 javax.naming.NamingException,
                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                java.sql.SQLException

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 javax.naming.NamingException,
                                                  java.sql.SQLException

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 javax.naming.NamingException,
                                                  java.sql.SQLException

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.