Lists one product in one e-commerce store, and carries the pricing and ordering that apply to it in that store only. The same product can be listed in several stores, each with its own row here. A row can override the store's GST rate, its internal margin, the cost of the product, and the position the product takes in the store's listing; where an override is left null the store's or the product's own value applies, which is what the effective accessors return. Removing a product from a store deletes this row and not the product itself.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
costOverrideBigDecimalA fixed invoice cost excluding tax for this product in this store. When set it is used as is, so neither the supplier's base cost nor the margin has any effect on the price.
createdByProfileThe profile of the administrator who added this product to the store.
createdDateDateWhen this product was added to the store.
effectiveGstBigDecimalThe tax rate actually applied to this product in this store, as a decimal. It is the override when one is set, otherwise the store's rate, and zero when the store has none.
effectiveMarginBigDecimalThe internal margin actually applied to this product in this store, as a decimal. It is the override when one is set, otherwise the store's margin, and zero when the store has none.
effectivePositionIntegerThe position actually used when ordering this store's listing, which is the override when one is set and otherwise the product's own position.
gstRateBigDecimalGoods and services tax rate for this product in this store, as a decimal, so 15 percent is 0.15. It overrides the store's own rate, and null means the store rate applies.
idlongPrimary key of this store listing, assigned when it is first saved.
marginBigDecimalInternal margin for this product in this store, as a decimal, so a 5 percent margin is 0.05. It overrides the store's default margin, and null means the store margin applies.
positionIntegerPosition of this product in the store's listing, lowest first. It overrides the position held on the product itself, and null means that one applies.
productProductThe product being listed. It is shared with every other store that lists it, so changing the product changes it everywhere; per-store differences belong on this row.
storeECommerceStoreThe store the product is listed in. It supplies the defaults this row can override.

Methods

getId() · getProduct() · setProduct(Product product) · getStore() · setStore(ECommerceStore store) · getGstRate() · setGstRate(BigDecimal gstRate) · getMargin() · setMargin(BigDecimal margin) · getCostOverride() · setCostOverride(BigDecimal costOverride) · getCreatedBy() · setCreatedBy(Profile createdBy) · getCreatedDate() · setCreatedDate(Date createdDate) · getPosition() · setPosition(Integer position) · getEffectivePosition() · getEffectiveGst() · getEffectiveMargin()

getId()

Returns: long

Primary key of this store listing, assigned when it is first saved.

getProduct()

Returns: Product

The product being listed. It is shared with every other store that lists it, so changing the product changes it everywhere; per-store differences belong on this row.

setProduct(Product product)

Returns: void

Sets the product being listed in the store.

ParameterDescription
productthe product to list

getStore()

Returns: ECommerceStore

The store the product is listed in. It supplies the defaults this row can override.

setStore(ECommerceStore store)

Returns: void

Sets the store the product is listed in.

ParameterDescription
storethe store to list the product in

getGstRate()

Returns: BigDecimal

Goods and services tax rate for this product in this store, as a decimal, so 15 percent is 0.15. It overrides the store's own rate, and null means the store rate applies.

setGstRate(BigDecimal gstRate)

Returns: void

Sets the tax rate override for this product in this store, as a decimal.

ParameterDescription
gstRatethe tax rate override, or null to use the store's rate

getMargin()

Returns: BigDecimal

Internal margin for this product in this store, as a decimal, so a 5 percent margin is 0.05. It overrides the store's default margin, and null means the store margin applies.

setMargin(BigDecimal margin)

Returns: void

Sets the internal margin override for this product in this store, as a decimal.

ParameterDescription
marginthe margin override, or null to use the store's margin

getCostOverride()

Returns: BigDecimal

A fixed invoice cost excluding tax for this product in this store. When set it is used as is, so neither the supplier's base cost nor the margin has any effect on the price.

setCostOverride(BigDecimal costOverride)

Returns: void

Sets a fixed invoice cost excluding tax, bypassing the base cost and margin calculation.

ParameterDescription
costOverridethe fixed invoice cost, or null to calculate it

getCreatedBy()

Returns: Profile

The profile of the administrator who added this product to the store.

setCreatedBy(Profile createdBy)

Returns: void

Sets the profile of the administrator who added this product to the store.

ParameterDescription
createdBythe creating profile

getCreatedDate()

Returns: Date

When this product was added to the store.

setCreatedDate(Date createdDate)

Returns: void

Sets when this product was added to the store.

ParameterDescription
createdDatethe creation timestamp

getPosition()

Returns: Integer

Position of this product in the store's listing, lowest first. It overrides the position held on the product itself, and null means that one applies.

setPosition(Integer position)

Returns: void

Sets the position of this product in the store's listing.

ParameterDescription
positionthe position override, or null to use the product's own position

getEffectivePosition()

Returns: Integer

The position actually used when ordering this store's listing, which is the override when one is set and otherwise the product's own position.

getEffectiveGst()

Returns: BigDecimal

The tax rate actually applied to this product in this store, as a decimal. It is the override when one is set, otherwise the store's rate, and zero when the store has none.

getEffectiveMargin()

Returns: BigDecimal

The internal margin actually applied to this product in this store, as a decimal. It is the override when one is set, otherwise the store's margin, and zero when the store has none.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.