Base Commerce Classes and Interfaces
The base commerce classes and interfaces are core objects that are used throughout Oracle ATG Web Commerce. These objects store the data that represent shopping carts, items to be purchased, shipping information, pricing information, and payment information. All the individual parts of ATG Commerce use these classes.
The Commerce interfaces are described in this section.
| Interface | Description | 
|---|
| Order
 | The Orderinterface represents the delivery and payment information for a collection of items. AnOrdercontainsCommerceItems,ShippingGroups,PaymentGroups, andRelationships. | 
| CommerceItem
 | The CommerceIteminterface represents information about a product to be purchased. ACommerceItemcontains the SKU (also called thecatalogRefId) and the quantity of the item purchased. | 
| ShippingGroup
 | The ShippingGroupinterface contains information about the delivery of a collection ofCommerceItemobjects. AShippingGroupcould contain a physical delivery address. | 
| PaymentGroup
 | The PaymentGroupinterface contains payment information, shipping costs, and tax information for each item or the entireOrder. This includes information such as a credit card number, an expiration date, and the amount to be charged. | 
| Relationship
 | The Relationshipinterface represents an association between two or more of the commerce objects listed above, such as the relationship between aCommerceItemand aShippingGroup. It is important to understand the concept of relationships, although they are usually hidden from the Commerce user. The commerce-specific interfaces that extend RelationshipareCommerceItemRelationship,ShippingGroupRelationship,PaymentGroupRelationship, andOrderRelationship. For more information, see the Using Relationship Objects section. | 
| HandlingInstruction
 | The HandlingInstructioninterface describes special handling for aCommerceItemwithin a givenShippingGroup. Gift wrapping is an example ofHandlingInstruction. | 
The following types of classes implement the interfaces described above:
In some cases, there may be only one implementation. Other interfaces are implemented by more than one class. For example, PaymentGroupImpl, CreditCard, and GiftCertificate all implement the PaymentGroup interface.
Order Classes
| Class | Description | 
|---|
| OrderImpl
 | This class implements Order. It contains data structures for managing collections of other commerce objects. It manages collections ofCommerceItem,ShippingGroup,PaymentGroup, andRelationshipobjects. | 
Order equality is determined by comparing the orderId, the lastModified information, and transient properties.
If you write any new code that modifies the Order object, make sure the code synchronizes on the Order object before it is modified.
Item Classes
| Class | Description | 
|---|
| CommerceItemImpl
 | This class implements CommerceItem. It stores the data about a specific item in anOrder. | 
Shipping Classes
| Classes | Description | 
|---|
| ShippingGroupImpl
 | This class implements ShippingGroup. It stores the data describing where and how to shipCommerceItems, as well as theRelationshipsto items in the shipping group. This class provides no functionality itself; it is used through theHardgoodShippingGroupandElectronicShippingGroupsubclasses (described below). | 
| HardgoodShippingGroup
 | This class implements ShippingGroupand extendsShippingGroupImpl. In addition to storing inherited data, it stores information about how theCommerceItemsare to be shipped to a physical street address, such as the carrier and postal address. | 
| ElectronicShippingGroup
 | This class implements ShippingGroupand extendsShippingGroupImpl. In addition to storing inherited data, it stores information about howCommerceItemsare to be delivered electronically, such as an e-mail address. | 
Payment Classes
| Payment Classes |  | 
|---|
| PaymentGroupImpl
 | This class implements PaymentGroup. It stores the payment information forCommerceItems, shipping costs, and tax. It also can containRelationshipsto those items, shipping costs, or tax costs in thePaymentGroup. This class provides no functionality itself, but is used through theCreditCardandGiftCertificatesubclasses (described below in this table). | 
| CreditCard
 | This class implements PaymentGroupand extendsPaymentGroupImpl. In addition to storing inherited data, it stores information about howCommerceItems, shipping costs, and tax costs are paid for using a credit card. | 
| GiftCertificate
 | This class implements PaymentGroupand extendsPaymentGroupImpl. In addition to storing inherited data, it stores information about howCommerceItems, shipping costs, and tax costs are paid for using a gift certificate. | 
| StoreCredit
 | This class implements PaymentGroupand extendsPaymentGroupImpl. In addition to storing inherited data, it stores information about howCommerceItems, shipping costs, and tax costs are paid for using a store credit. | 
Relationship Classes
| Classes | Description | 
|---|
| ShippingGroupCommerceItemRelationship
 | When this Relationshipis added to aShippingGroupandCommerceItem, theCommerceItemis shipped using the information in theShippingGroup. ThisRelationshipobject contains data such as the quantity to be shipped. | 
| PaymentGroupCommerceItemRelationship
 | When this Relationshipis added to aPaymentGroupandCommerceItem, theCommerceItemis paid for using the information in thePaymentGroup. ThisRelationshipobject contains data such as the quantity of the item to be paid for using thePaymentGroup. | 
| PaymentGroupShippingGroupRelationship
 | When this Relationshipis added to aPaymentGroupandShippingGroup, the shipping cost is paid for using the information in thePaymentGroup. ThisRelationshipobject contains data such as the amount of the shipping cost to be paid for using thePaymentGroup. | 
| PaymentGroupOrderRelationship
 | When this Relationshipis added to aPaymentGroupandOrder, the tax cost or order cost is paid for using the information in thePaymentGroup. ThisRelationshipobject contains data such as the amount of the tax cost to be paid for using thePaymentGroup. | 
Handling Classes
| Classes | Description | 
|---|
| HandlingInstructionImpl
 | This class implements HandlingInstruction. It contains aShippingGroupID,CommerceItemID, andquantity, as well as data about the quantity ofCommerceItemsin aShippingGroupneeds special handling. This class provides no functionality itself, but should be used through a subclass. | 
| GiftlistHandlingInstruction
 | This class implements HandlingInstructionand extendsHandlingInstructionImpl. In addition to storing all the basic data that it inherits, it also stores data about whichCommerceItemsin theOrderwere added from a gift list. |