Class Price
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,Serializable
Data object of entity type Price with amount, value and valid date.
A price manages all information relevant to prices like price, scaled price, purchase quantities, quantity units, packaging units, etc. A price is related to exactly one bucket.
- Since:
- 4.0.0, 4.0.5 origin attribute supported, added JPA annotations, getLanguage() and getCountry() are deprecated
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPrice()Default constructor.Price(String identifier, String entityPriceId, Context context, Bucket bucket, String label, String amount, String price) Creates a price with necessary properties.Price(String identifier, String entityPriceId, Context context, String bucketId, String label, String amount, String price, String createdBy, Date createdOn, String updatedBy, Date updatedOn) Creates a price with extended properties. -
Method Summary
Modifier and TypeMethodDescriptionAmountGet the context for this element ornullif not set.Identifier of an entity in the entity model where the current object refers to.String key for grouping prices of the same type.Get the string identifier of the price.getLabel()Display label for the price.getPrice()Get a price object.intGet sequence number for the price as given in the content system.Get timestamp from the content system.Version string from the content systemvoidvoidvoidsetBucketId(String bucketId) voidsetConnectorEntity(ConnectorEntity connectorEntity) voidsetContentMetaData(List<ContentMetaData> contentMetaData) voidsetContext(Context context) set the context of entity data objectvoidsetCreatedBy(String createdBy) voidsetCreatedOn(Date createdOn) voidsetCurrency(String currency) voidsetEntity(EntityPrice entityPrice) Sets entityPrice and entityPriceId.voidsetEntityIdentifier(String entityIdentifier) Identifier of an entity in the entity model where the current object refers to.voidsetEntityPriceId(String entityPriceId) Sets entityPriceId and eventually removes current entityPrice if it does not match the idvoidsetGroupIdentifier(String groupIdentifier) voidsetIdentifier(String identifier) voidsetItemPrice(String itemPrice) voidvoidsetListPrice(String listPrice) voidsetMetaData(List<KeyValue> metaData) voidsetMinOrderQuantity(String minOrderQuantity) voidsetOldItemPrice(String oldItemPrice) voidsetOldPrice(String oldPrice) voidvoidsetPackagingUnit(String packagingUnit) voidvoidsetPriceUnit(String priceUnit) voidsetQuantityOfPackingUnit(String quantityOfPackingUnit) voidsetSequence(int sequence) voidsetTemplate(String template) voidsetTimestamp(String timestamp) voidsetUpdatedBy(String updatedBy) voidsetUpdatedOn(Date updatedOn) voidsetValidFrom(Date validFrom) voidsetValidTo(Date validTo) voidsetVersion(String version) toString()
-
Constructor Details
-
Price
public Price()Default constructor. -
Price
public Price(String identifier, String entityPriceId, Context context, Bucket bucket, String label, String amount, String price) Creates a price with necessary properties.- Parameters:
identifier-getIdentifier()entityPriceId-getEntityPriceId()context-getContext()bucket-getBucket()label-getLabel()amount-getAmount()price-getPrice()
-
Price
public Price(String identifier, String entityPriceId, Context context, String bucketId, String label, String amount, String price, String createdBy, Date createdOn, String updatedBy, Date updatedOn) Creates a price with extended properties.- Parameters:
identifier-getIdentifier()entityPriceId-getEntityPriceId()context-getContext()bucketId-getBucketId()label-getLabel()amount-getAmount()price-getPrice()createdBy-getCreatedBy()createdOn-getCreatedOn()updatedBy-getUpdatedBy()updatedOn-getUpdatedOn()
-
-
Method Details
-
getIdentifier
Get the string identifier of the price.- Specified by:
getIdentifierin interfaceEntityData- Specified by:
getIdentifierin interfaceGetIdentifier- Specified by:
getIdentifierin interfacePersistentData- Returns:
- identifier string or
nullif not set
-
setIdentifier
- Specified by:
setIdentifierin interfaceEntityData- Parameters:
identifier- seegetIdentifier()
-
getGroupIdentifier
String key for grouping prices of the same type.- Returns:
- group identifier string or
nullif not set
-
setGroupIdentifier
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
getVersion
Version string from the content system- Returns:
- version string or
nullif not set
-
setVersion
- Parameters:
version- seegetVersion()
-
getTemplate
- Returns:
- String identifier of the template to render this content.
-
setTemplate
- Parameters:
template-getTemplate()
-
getTimestamp
Get timestamp from the content system.Timestamp is used as a string to support differing types of timestamp representation as used by different content system. publishing server does not validate any format of this string.
- Returns:
- timestamp string
-
setTimestamp
- Parameters:
timestamp- seegetTimestamp()
-
getEntity
- Returns:
- Price entity object associated with the current price or
nullif not set.
-
setEntity
Sets entityPrice and entityPriceId.- Parameters:
entityPrice-getEntity()- See Also:
-
getSequence
public int getSequence()Get sequence number for the price as given in the content system.This should reflect the position of the current price in the sorting of prices of its buckets.
- Specified by:
getSequencein interfaceGetSequence- Returns:
- ordered position within a list sequenceable objects
-
setSequence
public void setSequence(int sequence) - Parameters:
sequence- seegetSequence()
-
getContext
Get the context for this element ornullif not set.- Specified by:
getContextin interfaceEntityData- Specified by:
getContextin interfaceGetContext- Returns:
- context
-
setContext
Description copied from interface:EntityDataset the context of entity data object- Specified by:
setContextin interfaceEntityData- Parameters:
context-getContext()
-
getBucket
- Returns:
- Parent bucket that this price is related to.
-
setBucket
- Parameters:
bucket-getBucket()
-
getLabel
Display label for the price.- Returns:
- label or
nullif not set
-
setLabel
- Parameters:
label- seegetLabel()
-
getAmount
AmountThere is not special format for amounts, because this can have very different representations.
- Returns:
- amount
-
setAmount
- Parameters:
amount-getAmount()
-
getValidFrom
- Returns:
- Price is valid from
-
setValidFrom
- Parameters:
validFrom-getValidFrom()
-
getValidTo
- Returns:
- Price is valid to
-
setValidTo
- Parameters:
validTo-getValidTo()
-
getConnectorEntity
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
- Parameters:
connectorEntity- seegetConnectorEntity()
-
getEntityPriceId
- Returns:
- Identifier of related entity in entity model.
-
setEntityPriceId
Sets entityPriceId and eventually removes current entityPrice if it does not match the id- Parameters:
entityPriceId-getEntityPriceId()- Since:
- 4.0.0
-
getBucketId
- Returns:
- Identifier of parent bucket that this content element is related to. Is null for following methods:
EntityManagerRemote.getEntityPricesOfBucket(String, String, String, String, String, Context, String)EntityManagerRemote.getEntityPricesByIdentifier(String, String, String, String, Context, String)EntityManagerRemote.getEntityPricesOfPlanning(String, String, String, String, String, Context, String, String)EntityManagerRemote.getEntityPricesOfPlannedBucket(String, String, String, String, Context, String)
-
setBucketId
- Parameters:
bucketId-getBucketId()
-
getPrice
Get a price object.There is not special format for prices, because this can have very different representations.
- Returns:
- Price
-
setPrice
- Parameters:
price-getPrice()
-
getCurrency
- Returns:
- Currency of Price
-
setCurrency
- Parameters:
currency-getCurrency()
-
getPriceUnit
- Returns:
- like Piece, Bottle, Meter,..
-
setPriceUnit
- Parameters:
priceUnit-getPriceUnit()
-
getPackagingUnit
- Returns:
- Packages like Box of Bottles: Box
-
setPackagingUnit
- Parameters:
packagingUnit-getPackagingUnit()
-
getQuantityOfPackingUnit
- Returns:
- Number of units in a package like 6 Bottles in a Box: 6
-
setQuantityOfPackingUnit
- Parameters:
quantityOfPackingUnit-getQuantityOfPackingUnit()
-
getItemPrice
- Returns:
- Price of a priceUnit
-
setItemPrice
- Parameters:
itemPrice-getItemPrice()
-
getMinOrderQuantity
- Returns:
- Minimal order quantity
-
setMinOrderQuantity
- Parameters:
minOrderQuantity-getMinOrderQuantity()
-
getOldPrice
- Returns:
- Old price
-
setOldPrice
- Parameters:
oldPrice-getOldPrice()
-
getOldItemPrice
- Returns:
- Old price of an item
-
setOldItemPrice
- Parameters:
oldItemPrice-getOldItemPrice()
-
getListPrice
- Returns:
- list price
-
setListPrice
- Parameters:
listPrice-getListPrice()
-
getMetaData
- Returns:
- List of meta data related to the bucket or empty list.
List is LAZY loaded.
-
setMetaData
- Parameters:
metaData- seegetMetaData()
-
getCreatedBy
- Returns:
- creation user or
nullif not set
-
setCreatedBy
- Parameters:
createdBy- seegetCreatedBy()
-
getCreatedOn
- Returns:
- creation date or
nullif not set
-
setCreatedOn
- Parameters:
createdOn- seegetCreatedOn()
-
getUpdatedBy
- Returns:
- last modified user or
nullif not set
-
setUpdatedBy
- Parameters:
updatedBy- seegetUpdatedBy()
-
getUpdatedOn
- Returns:
- last modified date or
nullif not set
-
setUpdatedOn
- Parameters:
updatedOn- seegetUpdatedOn()
-
toString
-
getOrigin
- Returns:
- Origin of data entity object, e.g. name of the source system. This property is filled by the connector. Might return
null.
-
setOrigin
- Parameters:
origin-getOrigin()
-
getEntityIdentifier
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
getEntityIdentifierin interfaceEntityData- Returns:
- entity identifier as string
-
setEntityIdentifier
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
setEntityIdentifierin interfaceEntityData
-
getContentMetaData
- Returns:
- List of ContentMetaData related to Price.
List is not loaded by Entity Manager in its standard methods. Use specific Entity Manager methods for loading.
-
setContentMetaData
- Parameters:
contentMetaData-getContentMetaData()
-