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. OrderItems are such as prices, minimum quantities, and who can use the Contract. This bean accesses the database table CONTRACT
Modifier and Type | Field and Description |
---|---|
java.lang.String | comments
Implementation field for persistent attribute: comments
|
java.lang.Long | familyId |
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 and Description |
---|
ContractBeanBase()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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,
|
void | ejbPostCreate(java.lang.Long argTradingId, java.lang.Integer argOrigin, java.lang.String argName, java.lang.Long argOwnerId)
The postCreate method for the Contract bean.
|
void | ejbPostCreate(java.lang.String argName, java.lang.Integer argMajorVersion, java.lang.Integer argMinorVersion, java.lang.Long argOwnerId, java.sql.Timestamp argStartTime, java.sql.Timestamp argEndTime)
The postCreate method for the Contract bean.
|
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.
|
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.Long | getFamilyId()
Provides access to the CONTRACT.FAMILY_ID column of DB2 type BIGINT NULL.
|
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.
|
void | setFamilyId(java.lang.Long newFamilyId)
Provides access to the CONTRACT.FAMILY_ID column of DB2 type BIGINT 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.
|
public java.lang.Long referenceNumber
public java.lang.String name
public java.lang.Integer majorVersion
public java.lang.Integer minorVersion
public java.lang.Long ownerReferenceNumber
public java.lang.Integer origin
public java.lang.Integer state
public java.lang.Integer usage
public java.lang.Integer markForDelete
public java.sql.Timestamp timeCreated
public java.sql.Timestamp timeUpdated
public java.sql.Timestamp timeApproved
public java.sql.Timestamp timeActivated
public java.sql.Timestamp timeDeployed
public java.lang.Long familyId
public java.lang.String comments
public ContractBeanBase()
public void addToStore(java.lang.Integer argStoreId) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public java.lang.Long createNewVersion() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
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 .
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.
public void ejbPostCreate(java.lang.Long argTradingId, java.lang.Integer argOrigin, java.lang.String argName, java.lang.Long argOwnerId)
public void ejbPostCreate(java.lang.String argName, java.lang.Integer argMajorVersion, java.lang.Integer argMinorVersion, java.lang.Long argOwnerId, java.sql.Timestamp argStartTime, java.sql.Timestamp argEndTime)
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.
public java.lang.Long getReferredTradingAgreementId() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public java.lang.String getComments()
Provides access to the CONTRACT.COMMENTS column of DB2.
The following is a description of this column:
A comment associated with the Contract.
public ParticipantAccessBean[] getContractLevelParticipants() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public TradingDescriptionAccessBean getDescription(java.lang.Integer argLanguageId) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
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.
public java.util.Enumeration getContractsReferringToContractId() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
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.
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.
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.
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.
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.
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.
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.
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.
public java.lang.Long getFamilyId()
Provides access to the CONTRACT.FAMILY_ID column of DB2 type BIGINT NULL.
The following is a description of this column:
Family identifier for a contract.
public java.lang.String getStoreXMLDefinition() throws javax.naming.NamingException, javax.ejb.CreateException, javax.ejb.FinderException, java.sql.SQLException
public java.lang.String getStoreXMLString() throws javax.naming.NamingException, javax.ejb.CreateException, javax.ejb.FinderException, java.sql.SQLException
public TermConditionAccessBean[] getTCs() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public TermConditionAccessBean[] getTCsByTCSubType(java.lang.String argTCSubType) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
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).
public TermConditionAccessBean[] getTCsByTCType(java.lang.String argTCType) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
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).
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.
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.
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.
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.
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.
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.
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.
public void setReferredTradingAgreementId(java.lang.Long newReferenceId) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public void setComments(java.lang.String newComments)
Provides access to the CONTRACT.COMMENTS column.
The following is a description of this column:
A comment associated with the Contract.
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.
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.
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.
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.
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.
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.
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.
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.
public void setFamilyId(java.lang.Long newFamilyId)
Provides access to the CONTRACT.FAMILY_ID column of DB2 type BIGINT NULL.
The following is a description of this column:
Family identifier for a contract.
public void setStoreXMLDefinition(org.w3c.dom.Element e) throws javax.naming.NamingException, javax.ejb.CreateException, javax.ejb.FinderException, java.sql.SQLException
public void setStoreXMLDefinition(java.lang.String newValue) throws javax.naming.NamingException, javax.ejb.CreateException, javax.ejb.FinderException, java.sql.SQLException
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.
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.
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.
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.
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.
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.
public TermConditionAccessBean[] getXMLByTradingIdAndType(java.lang.Long tradingId, java.lang.Integer type) throws javax.naming.NamingException, javax.ejb.CreateException, java.sql.SQLException