com.ibm.commerce.contract.objimpl
Class ContractBeanBase

java.lang.Object
  |
  +--com.ibm.commerce.base.objects.ECEntityBean
        |
        +--com.ibm.commerce.contract.objimpl.ContractBeanBase
Direct Known Subclasses:
ContractBean

public class ContractBeanBase
extends com.ibm.commerce.base.objects.ECEntityBean

Provides access to the CONTRACT table.

The following is a description of this table:

Each row of this table represents a Contract. A Contract is part of a Store, and represents terms and conditions that may be associated with OrderItems, such as prices, minimum quantities, and who can use the Contract.

See Also:
Serialized Form

Field Summary
 java.lang.Integer majorVersion
           
 java.lang.Integer markForDelete
           
 java.lang.Integer minorVersion
           
 java.lang.String name
           
 java.lang.Integer origin
           
 java.lang.Long ownerReferenceNumber
           
 java.lang.Long referenceNumber
           
 java.lang.Integer state
           
 java.sql.Timestamp timeActivated
           
 java.sql.Timestamp timeApproved
           
 java.sql.Timestamp timeCreated
           
 java.sql.Timestamp timeDeployed
           
 java.sql.Timestamp timeUpdated
           
 java.lang.Integer usage
           
 
Constructor Summary
ContractBeanBase()
          Default constructor.
 
Method Summary
 void addToStore(java.lang.Integer argStoreId)
          Adds a contract to the store.
 java.lang.Long createNewVersion()
          Creates a new version of the contract.
 com.ibm.commerce.contract.objects.ContractKey ejbCreate(java.lang.Long argTradingId, java.lang.Integer argOrigin, java.lang.String argName, java.lang.Long argOwnerId)
          Constructs an ContractAccessBean object with the specified contract ID, origin, name, and the owner ID.
 com.ibm.commerce.contract.objects.ContractKey ejbCreate(java.lang.String argName, java.lang.Integer argMajorVersion, java.lang.Integer argMinorVersion, java.lang.Long argOwnerId, java.sql.Timestamp argStartTime, java.sql.Timestamp argEndTime)
          Constructs an ContractAccessBean object with the specified contract name, major version,
 java.lang.Long getAccountId()
          Provides access to the TRADING.ACCOUNT_ID column of DB2 type BIGINT NULL.
 java.lang.String getComments()
          Provides access to the CONTRACT.COMMENTS column of DB2 type LONG NULL.
  ParticipantAccessBean[] getContractLevelParticipants()
          Returns an array of ParticipantAccessBean objects representing all participants that the current contract has.
 java.util.Enumeration getContractsReferringToContractId()
          Retrieves all the trading agreements that refer to this contract.
  TradingDescriptionAccessBean getDescription(java.lang.Integer argLanguageId)
          Retrieves the TradingDescriptionAccessBean representing the contract description with the specified language ID.
  TradingDescriptionAccessBean getDescription(java.lang.Integer language_id, java.lang.Integer storeId)
          Retrieves the TradingDescriptionAccessBean representing the contract description with the specified language ID.
 java.lang.Integer getMajorVersion()
          Provides access to the CONTRACT.MAJORVERSION column of DB2 type INTEGER NOT NULL.
 java.lang.Integer getMarkForDelete()
          Provides access to the CONTRACT.MARKFORDELETE column of DB2 type INTEGER NOT NULL.
 java.lang.Integer getMinorVersion()
          Provides access to the CONTRACT.MINORVERSION column of DB2 type INTEGER NOT NULL.
 java.lang.String getName()
          Provides access to the CONTRACT.NAME column of DB2 type VARCHAR(200) NOT NULL.
 java.lang.Integer getOrigin()
          Provides access to the CONTRACT.ORIGIN column of DB2 type INTEGER NOT NULL.
 java.lang.Long getOwnerReferenceNumber()
          Provides access to the CONTRACT.MEMBER_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Long getReferenceNumber()
          Provides access to the CONTRACT.CONTRACT_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Long getReferredTradingAgreementId()
          Retrieves the trading agreement referred to by this contract.
 java.lang.Integer getState()
          Provides access to the CONTRACT.STATE column of DB2 type INTEGER NOT NULL.
 java.lang.String getStoreXMLDefinition()
          Retrieves the XML associated with the contract from the CNTRSTORE table.
 java.lang.String getStoreXMLString()
          Returns the XML associated with the contract from the CNTRSTORE table without the XML header string.
  TermConditionAccessBean[] getTCs()
          Retrieves an array of TermConditionAccessBean representing all the terms and conditions that the current contract has.
  TermConditionAccessBean[] getTCsByTCSubType(java.lang.String argTCSubType)
          Returns an array of TermConditionAccessBeans representing the terms and conditions with the given tcSubType.
  TermConditionAccessBean[] getTCsByTCSubTypeWithoutTCParticipant(java.lang.String argTCSubType)
          Returns an array of TermConditionAccessBean representing the terms and conditions with the given tcSubType, but without the terms and conditions that have participant(s).
  TermConditionAccessBean[] getTCsByTCType(java.lang.String argTCType)
          Returns an array of TermConditionAccessBean representing the terms and conditions with the given tcType.
  TermConditionAccessBean[] getTCsByTCTypeWithoutTCParticipant(java.lang.String argTCType)
          Returns an array of TermConditionAccessBean representing the terms and conditions with the given tcType, but without the terms and conditions that have participant(s).
 java.sql.Timestamp getTimeActivated()
          Provides access to the CONTRACT.TIMEACTIVATED column of DB2 type TIMESTAMP NULL.
 java.sql.Timestamp getTimeApproved()
          Provides access to the CONTRACT.TIMEAPPROVED column of DB2 type TIMESTAMP NULL.
 java.sql.Timestamp getTimeCreated()
          Provides access to the CONTRACT.TIMECREATED column of DB2 type TIMESTAMP NULL.
 java.sql.Timestamp getTimeDeployed()
          Provides access to the CONTRACT.TIMEDEPLOYED column of DB2 type TIMESTAMP NULL.
 java.sql.Timestamp getTimeUpdated()
          Provides access to the CONTRACT.TIMEUPDATED column of DB2 type TIMESTAMP NULL.
 java.lang.Integer getUsage()
          Provides access to the CONTRACT.USAGE column of DB2 type INTEGER NOT NULL.
  TermConditionAccessBean[] getXMLByTradingIdAndType(java.lang.Long tradingId, java.lang.Integer type)
          Retrieves an array of TermConditionAccessBeans based on the trading ID and type in the TCATTR table.
 void setAccountId(java.lang.Long newAccountId)
          Provides access to the TRADING.ACCOUNT_ID column of DB2 type BIGINT NULL.
 void setComments(java.lang.String newComments)
          Provides access to the CONTRACT.COMMENTS column of DB2 type LONG NULL.
 void setMajorVersion(java.lang.Integer newMajorVersion)
          Provides access to the CONTRACT.MAJORVERSION column of DB2 type INTEGER NOT NULL.
 void setMarkForDelete(java.lang.Integer newMarkForDelete)
          Provides access to the CONTRACT.MARKFORDELETE column of DB2 type INTEGER NOT NULL.
 void setMinorVersion(java.lang.Integer newMinorVersion)
          Provides access to the CONTRACT.MINORVERSION column of DB2 type INTEGER NOT NULL.
 void setName(java.lang.String newValue)
          Provides access to the CONTRACT.NAME column of DB2 type VARCHAR(200) NOT NULL.
 void setOrigin(java.lang.Integer newValue)
          Provides access to the CONTRACT.ORIGIN column of DB2 type INTEGER NOT NULL.
 void setOwnerReferenceNumber(java.lang.Long newValue)
          Provides access to the CONTRACT.MEMBER_ID column of DB2 type BIGINT NOT NULL.
 void setReferenceNumber(java.lang.Long newReferenceNumber)
          Provides access to the CONTRACT.CONTRACT_ID column of DB2 type BIGINT NOT NULL.
 void setReferredTradingAgreementId(java.lang.Long newReferenceId)
          Stores the trading agreement ID referred to by this contract.
 void setState(java.lang.Integer newValue)
          Provides access to the CONTRACT.STATE column of DB2 type INTEGER NOT NULL.
 void setStoreXMLDefinition(org.w3c.dom.Element e)
          Stores the XML associated with the contract in the CNTRSTORE table.
 void setStoreXMLDefinition(java.lang.String newValue)
          Stores the XML associated with the contract in the CNTRSTORE table.
 void setTimeActivated(java.sql.Timestamp newValue)
          Provides access to the CONTRACT.TIMEACTIVATED column of DB2 type TIMESTAMP NULL.
 void setTimeApproved(java.sql.Timestamp newTimeApproved)
          Provides access to the CONTRACT.TIMEAPPROVED column of DB2 type TIMESTAMP NULL.
 void setTimeCreated(java.sql.Timestamp newValue)
          Provides access to the CONTRACT.TIMECREATED column of DB2 type TIMESTAMP NULL.
 void setTimeDeployed(java.sql.Timestamp newValue)
          Provides access to the CONTRACT.TIMEDEPLOYED column of DB2 type TIMESTAMP NULL.
 void setTimeUpdated(java.sql.Timestamp newTimeUpdated)
          Provides access to the CONTRACT.TIMEUPDATED column of DB2 type TIMESTAMP NULL.
 void setUsage(java.lang.Integer newUsage)
          Provides access to the CONTRACT.USAGE column of DB2 type INTEGER NOT NULL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

referenceNumber

public java.lang.Long referenceNumber

name

public java.lang.String name

majorVersion

public java.lang.Integer majorVersion

minorVersion

public java.lang.Integer minorVersion

ownerReferenceNumber

public java.lang.Long ownerReferenceNumber

origin

public java.lang.Integer origin

state

public java.lang.Integer state

usage

public java.lang.Integer usage

markForDelete

public java.lang.Integer markForDelete

timeCreated

public java.sql.Timestamp timeCreated

timeUpdated

public java.sql.Timestamp timeUpdated

timeApproved

public java.sql.Timestamp timeApproved

timeActivated

public java.sql.Timestamp timeActivated

timeDeployed

public java.sql.Timestamp timeDeployed
Constructor Detail

ContractBeanBase

public ContractBeanBase()
Default constructor. Maps to findByPrimaryKey.
Method Detail

addToStore

public void addToStore(java.lang.Integer argStoreId)
                throws javax.ejb.CreateException,
                       javax.ejb.FinderException,
                       javax.naming.NamingException
Adds a contract to the store.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

createNewVersion

public java.lang.Long createNewVersion()
                                throws javax.ejb.CreateException,
                                       javax.ejb.FinderException,
                                       javax.naming.NamingException
Creates a new version of the contract.
Returns:
The ID of the new contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

ejbCreate

public com.ibm.commerce.contract.objects.ContractKey ejbCreate(java.lang.Long argTradingId,
                                                               java.lang.Integer argOrigin,
                                                               java.lang.String argName,
                                                               java.lang.Long argOwnerId)
                                                        throws javax.ejb.CreateException,
                                                               javax.ejb.FinderException,
                                                               javax.naming.NamingException

Constructs an ContractAccessBean object with the specified contract ID, origin, name, and the owner ID.

This create method will be invoked when creating a contract from rfq.

Parameters:
argTradingId - The ID of the contract.
argOrigin - The origin of the contract.
argName - The name of the contract
argOwnerId - The ID of the contract owner.
Returns:
The ContractKey of the new contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

ejbCreate

public com.ibm.commerce.contract.objects.ContractKey ejbCreate(java.lang.String argName,
                                                               java.lang.Integer argMajorVersion,
                                                               java.lang.Integer argMinorVersion,
                                                               java.lang.Long argOwnerId,
                                                               java.sql.Timestamp argStartTime,
                                                               java.sql.Timestamp argEndTime)
                                                        throws javax.ejb.CreateException,
                                                               javax.ejb.FinderException,
                                                               javax.naming.NamingException

Constructs an ContractAccessBean object with the specified contract name, major version,

minor version, owner ID, starting time, and the ending time.

This create method will be invoked when creating a new contract from scratch.

Parameters:
argName - The name of the contract.
argMajorVersion - The major version number of the contract.
argMinorVersion - The minor version number of the contract.
argOwnerId - The ID of the contract owner.
argStartTime - The starting time of the contract.
argEndTime - The ending time of the contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getAccountId

public java.lang.Long getAccountId()
                            throws javax.ejb.CreateException,
                                   javax.ejb.FinderException,
                                   javax.naming.NamingException

Provides access to the TRADING.ACCOUNT_ID column of DB2 type BIGINT NULL.

The following is a description of this column:

The account which the contract referred to.

Returns:
The ID of an account which the contract referred to.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getReferredTradingAgreementId

public java.lang.Long getReferredTradingAgreementId()
                                             throws javax.ejb.CreateException,
                                                    javax.ejb.FinderException,
                                                    javax.naming.NamingException
Retrieves the trading agreement referred to by this contract.
Returns:
The ID of the trading agreement referred to by this contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getComments

public java.lang.String getComments()

Provides access to the CONTRACT.COMMENTS column of DB2 type LONG NULL.

The following is a description of this column:

A comment associated with the Contract.

Returns:
The comments of the contract.

getContractLevelParticipants

public ParticipantAccessBean[] getContractLevelParticipants()
                                                     throws javax.ejb.CreateException,
                                                            javax.ejb.FinderException,
                                                            javax.naming.NamingException
Returns an array of ParticipantAccessBean objects representing all participants that the current contract has.
Returns:
An array of ParticipantAccessBean objects.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getDescription

public TradingDescriptionAccessBean getDescription(java.lang.Integer argLanguageId)
                                            throws javax.ejb.CreateException,
                                                   javax.ejb.FinderException,
                                                   javax.naming.NamingException
Retrieves the TradingDescriptionAccessBean representing the contract description with the specified language ID.
Parameters:
argLanguageId - The ID of the language.
Returns:
The TradingDescriptionAccessBean representing the row that matches the search criteria.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getDescription

public TradingDescriptionAccessBean getDescription(java.lang.Integer language_id,
                                                   java.lang.Integer storeId)
                                            throws javax.ejb.CreateException,
                                                   javax.ejb.FinderException,
                                                   javax.naming.NamingException

Retrieves the TradingDescriptionAccessBean representing the contract description with the specified language ID.

If the description for the specified language is not available for the specified store, an alternate language description will be returned.

Parameters:
language_id - The ID of the language.
storeId - The ID of the store.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getContractsReferringToContractId

public java.util.Enumeration getContractsReferringToContractId()
                                                        throws javax.ejb.CreateException,
                                                               javax.ejb.FinderException,
                                                               javax.naming.NamingException
Retrieves all the trading agreements that refer to this contract.
Returns:
An enumeration of trading agreement IDs.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getMajorVersion

public java.lang.Integer getMajorVersion()

Provides access to the CONTRACT.MAJORVERSION column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Major version number of the Contract.

Returns:
The major version number of the contract.

getMarkForDelete

public java.lang.Integer getMarkForDelete()

Provides access to the CONTRACT.MARKFORDELETE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Indicates if this contract has been marked for deletion:

0 = No.

1 = Yes, this Contract has been marked for deletion.

Returns:
The indication flag representating whether this contract has been marked for deletion.

getMinorVersion

public java.lang.Integer getMinorVersion()

Provides access to the CONTRACT.MINORVERSION column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Minor version number of the Contract.

Returns:
The minor version number of the contract.

getName

public java.lang.String getName()

Provides access to the CONTRACT.NAME column of DB2 type VARCHAR(200) NOT NULL.

The following is a description of this column:

Uniquely identifies a version of a Contract of a particular Origin for a particular owner.

Returns:
The name of the contract.

getOrigin

public java.lang.Integer getOrigin()

Provides access to the CONTRACT.ORIGIN column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

How the Contract was created:

0 = manual.

1 = imported.

2 = RFQ.

3 = exchange.

4 = auction.

5 = reverse auction.

6 = 2-party negotiation.

Returns:
The origin of the contract.

getOwnerReferenceNumber

public java.lang.Long getOwnerReferenceNumber()

Provides access to the CONTRACT.MEMBER_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Owner of the Contract.

Returns:
The ID of the contract owner.

getReferenceNumber

public java.lang.Long getReferenceNumber()

Provides access to the CONTRACT.CONTRACT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Unique identifier for a contract. Foreign key to TRADING_ID in the TRADING database table.

Returns:
The ID of the contract.

getState

public java.lang.Integer getState()

Provides access to the CONTRACT.STATE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Contract state:

0 = draft.

1 = pending approval.

2 = approved.

3 = active.

4 = rejected.

5 = canceled.

6 = closed.

7 = suspended.

-1 = deployment in progress.

-2 = deployment failed.

Returns:
The state of the contract.

getStoreXMLDefinition

public java.lang.String getStoreXMLDefinition()
                                       throws javax.naming.NamingException,
                                              javax.ejb.CreateException,
                                              javax.ejb.FinderException,
                                              java.sql.SQLException
Retrieves the XML associated with the contract from the CNTRSTORE table.
Returns:
The XML associated with the contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException

getStoreXMLString

public java.lang.String getStoreXMLString()
                                   throws javax.naming.NamingException,
                                          javax.ejb.CreateException,
                                          javax.ejb.FinderException,
                                          java.sql.SQLException
Returns the XML associated with the contract from the CNTRSTORE table without the XML header string.
Returns:
The XML associated with the contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException

getTCs

public TermConditionAccessBean[] getTCs()
                                 throws javax.ejb.CreateException,
                                        javax.ejb.FinderException,
                                        javax.naming.NamingException
Retrieves an array of TermConditionAccessBean representing all the terms and conditions that the current contract has.
Returns:
An array of TermConditionAccessBean objects which the contract has.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getTCsByTCSubType

public TermConditionAccessBean[] getTCsByTCSubType(java.lang.String argTCSubType)
                                            throws javax.ejb.CreateException,
                                                   javax.ejb.FinderException,
                                                   javax.naming.NamingException
Returns an array of TermConditionAccessBeans representing the terms and conditions with the given tcSubType.
Parameters:
argTCSubType - The subtype of the terms and conditions.
Returns:
An array of the TermConditionAccessBeans which have the specified subtype.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getTCsByTCSubTypeWithoutTCParticipant

public TermConditionAccessBean[] getTCsByTCSubTypeWithoutTCParticipant(java.lang.String argTCSubType)
                                                                throws javax.ejb.CreateException,
                                                                       javax.ejb.FinderException,
                                                                       javax.naming.NamingException

Returns an array of TermConditionAccessBean representing the terms and conditions with the given tcSubType, but without the terms and conditions that have participant(s).

Parameters:
argTCSubType - The subtype of the terms and conditions.
Returns:
An array of n array of TermConditionAccessBean objects which have the specified tcSubType.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getTCsByTCType

public TermConditionAccessBean[] getTCsByTCType(java.lang.String argTCType)
                                         throws javax.ejb.CreateException,
                                                javax.ejb.FinderException,
                                                javax.naming.NamingException
Returns an array of TermConditionAccessBean representing the terms and conditions with the given tcType.
Parameters:
argTCType - The type of terms and conditions.
Returns:
An array of TermConditionAccessBean objects which have the specified tcType.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getTCsByTCTypeWithoutTCParticipant

public TermConditionAccessBean[] getTCsByTCTypeWithoutTCParticipant(java.lang.String argTCType)
                                                             throws javax.ejb.CreateException,
                                                                    javax.ejb.FinderException,
                                                                    javax.naming.NamingException

Returns an array of TermConditionAccessBean representing the terms and conditions with the given tcType, but without the terms and conditions that have participant(s).

Parameters:
argTCType - The type of terms and conditions.
Returns:
An array of TermConditionAccessBean objects which have the specified tcType.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

getTimeActivated

public java.sql.Timestamp getTimeActivated()

Provides access to the CONTRACT.TIMEACTIVATED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was activated.

Returns:
The time the contract was activated.

getTimeApproved

public java.sql.Timestamp getTimeApproved()

Provides access to the CONTRACT.TIMEAPPROVED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was approved.

Returns:
The time the contract was approved.

getTimeCreated

public java.sql.Timestamp getTimeCreated()

Provides access to the CONTRACT.TIMECREATED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was created.

Returns:
The time the contract was created.

getTimeDeployed

public java.sql.Timestamp getTimeDeployed()

Provides access to the CONTRACT.TIMEDEPLOYED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was deployed.

Returns:
The time the contract was deployed.

getTimeUpdated

public java.sql.Timestamp getTimeUpdated()

Provides access to the CONTRACT.TIMEUPDATED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was most recently updated.

Returns:
The time the contract was most recently updated.

getUsage

public java.lang.Integer getUsage()

Provides access to the CONTRACT.USAGE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Contract usage:

0 = default.

1 = organization buyer.

2 = reseller.

3 = special bid.

4 = referral.

Returns:
The usage of the contract.

setAccountId

public void setAccountId(java.lang.Long newAccountId)
                  throws javax.ejb.CreateException,
                         javax.ejb.FinderException,
                         javax.naming.NamingException

Provides access to the TRADING.ACCOUNT_ID column of DB2 type BIGINT NULL.

The following is a description of this column:

The account which the contract referred to.

Parameters:
newAccountId - The ID of an account which the contract referred to.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

setReferredTradingAgreementId

public void setReferredTradingAgreementId(java.lang.Long newReferenceId)
                                   throws javax.ejb.CreateException,
                                          javax.ejb.FinderException,
                                          javax.naming.NamingException
Stores the trading agreement ID referred to by this contract.
Parameters:
newReferenceId - The ID of the trading agreement referred to by this contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.

setComments

public void setComments(java.lang.String newComments)

Provides access to the CONTRACT.COMMENTS column of DB2 type LONG NULL.

The following is a description of this column:

A comment associated with the Contract.

Parameters:
newComments - The comments of the contract.

setMajorVersion

public void setMajorVersion(java.lang.Integer newMajorVersion)

Provides access to the CONTRACT.MAJORVERSION column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Major version number of the Contract.

Parameters:
newMajorVersion - The major version number of the contract.

setMarkForDelete

public void setMarkForDelete(java.lang.Integer newMarkForDelete)

Provides access to the CONTRACT.MARKFORDELETE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Indicates if this contract has been marked for deletion:

0 = No.

1 = Yes, this Contract has been marked for deletion.

Parameters:
newMarkForDelete - The indication flag representating whether this contract has been marked for deletion.

setMinorVersion

public void setMinorVersion(java.lang.Integer newMinorVersion)

Provides access to the CONTRACT.MINORVERSION column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Minor version number of the Contract.

Parameters:
newMinorVersion - The minor version number of the contract.

setName

public void setName(java.lang.String newValue)

Provides access to the CONTRACT.NAME column of DB2 type VARCHAR(200) NOT NULL.

The following is a description of this column:

Uniquely identifies a version of a Contract of a particular Origin for a particular owner.

Parameters:
newValue - The name of the contract.

setOrigin

public void setOrigin(java.lang.Integer newValue)

Provides access to the CONTRACT.ORIGIN column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

How the Contract was created:

0 = manual.

1 = imported.

2 = RFQ.

3 = exchange.

4 = auction.

5 = reverse auction.

6 = 2-party negotiation.

Parameters:
newValue - The origin of the contract.

setOwnerReferenceNumber

public void setOwnerReferenceNumber(java.lang.Long newValue)

Provides access to the CONTRACT.MEMBER_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Owner of the Contract.

Parameters:
newValue - The ID of the contract owner.

setReferenceNumber

public void setReferenceNumber(java.lang.Long newReferenceNumber)

Provides access to the CONTRACT.CONTRACT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

Unique identifier for a contract. Foreign key to TRADING_ID in the TRADING database table.

Parameters:
newReferenceNumber - The ID of the contract.

setState

public void setState(java.lang.Integer newValue)

Provides access to the CONTRACT.STATE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Contract state:

0 = draft.

1 = pending approval.

2 = approved.

3 = active.

4 = rejected.

5 = canceled.

6 = closed.

7 = suspended.

-1 = deployment in progress.

-2 = deployment failed.

Parameters:
newValue - The state of the contract.

setStoreXMLDefinition

public void setStoreXMLDefinition(org.w3c.dom.Element e)
                           throws javax.naming.NamingException,
                                  javax.ejb.CreateException,
                                  javax.ejb.FinderException,
                                  java.sql.SQLException
Stores the XML associated with the contract in the CNTRSTORE table.
Parameters:
e - The XML element associated with the contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException

setStoreXMLDefinition

public void setStoreXMLDefinition(java.lang.String newValue)
                           throws javax.naming.NamingException,
                                  javax.ejb.CreateException,
                                  javax.ejb.FinderException,
                                  java.sql.SQLException
Stores the XML associated with the contract in the CNTRSTORE table.
Parameters:
newValue - The XML string associated with the contract.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException

setTimeActivated

public void setTimeActivated(java.sql.Timestamp newValue)

Provides access to the CONTRACT.TIMEACTIVATED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was activated.

Parameters:
newValue - The time the contract was activated.

setTimeApproved

public void setTimeApproved(java.sql.Timestamp newTimeApproved)

Provides access to the CONTRACT.TIMEAPPROVED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was approved.

Parameters:
newTimeApproved - The time the contract was approved.

setTimeCreated

public void setTimeCreated(java.sql.Timestamp newValue)

Provides access to the CONTRACT.TIMECREATED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was created.

Parameters:
newValue - The time the contract was created.

setTimeDeployed

public void setTimeDeployed(java.sql.Timestamp newValue)

Provides access to the CONTRACT.TIMEDEPLOYED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was deployed.

Parameters:
newValue - The time the contract was deployed.

setTimeUpdated

public void setTimeUpdated(java.sql.Timestamp newTimeUpdated)

Provides access to the CONTRACT.TIMEUPDATED column of DB2 type TIMESTAMP NULL.

The following is a description of this column:

The time the contract was most recently updated.

Parameters:
newTimeUpdated - The time the contract was most recently updated.

setUsage

public void setUsage(java.lang.Integer newUsage)

Provides access to the CONTRACT.USAGE column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

Contract usage:

0 = default.

1 = reseller.

2 = organization buyer.

3 = special bid.

Parameters:
newUsage - The usage of the contract.

getXMLByTradingIdAndType

public TermConditionAccessBean[] getXMLByTradingIdAndType(java.lang.Long tradingId,
                                                          java.lang.Integer type)
                                                   throws javax.naming.NamingException,
                                                          javax.ejb.CreateException,
                                                          java.sql.SQLException
Retrieves an array of TermConditionAccessBeans based on the trading ID and type in the TCATTR table.
Parameters:
tradingId - The ID of the trading agreement.
type - The type of the trading agreement.
Returns:
An array of TermConditionAccessBeans matching the specified trading ID and type.
Throws:
javax.ejb.CreateException - The javax.ejb.CreateException exception.
javax.ejb.FinderException - The javax.ejb.FinderException exception.
javax.naming.NamingException - The javax.naming.NamingException exception.
java.sql.SQLException