java.lang.Object
com.priint.pubserver.plugin.entitydata.Price
All Implemented Interfaces:
GetContext, GetIdentifier, GetSequence, EntityData, PersistentData, Serializable

@Entity public class Price extends Object implements Serializable, GetIdentifier, GetContext, GetSequence, EntityData, PersistentData

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:
  • Constructor Details

  • Method Details

    • getIdentifier

      public String getIdentifier()
      Get the string identifier of the price.
      Specified by:
      getIdentifier in interface EntityData
      Specified by:
      getIdentifier in interface GetIdentifier
      Specified by:
      getIdentifier in interface PersistentData
      Returns:
      identifier string or null if not set
    • setIdentifier

      public void setIdentifier(String identifier)
      Specified by:
      setIdentifier in interface EntityData
      Parameters:
      identifier - see getIdentifier()
    • getGroupIdentifier

      public String getGroupIdentifier()
      String key for grouping prices of the same type.
      Returns:
      group identifier string or null if not set
    • setGroupIdentifier

      public void setGroupIdentifier(String groupIdentifier)
      Parameters:
      groupIdentifier - see getGroupIdentifier()
    • getVersion

      public String getVersion()
      Version string from the content system
      Returns:
      version string or null if not set
    • setVersion

      public void setVersion(String version)
      Parameters:
      version - see getVersion()
    • getTemplate

      public String getTemplate()
      Returns:
      String identifier of the template to render this content.
    • setTemplate

      public void setTemplate(String template)
      Parameters:
      template - getTemplate()
    • getTimestamp

      public String 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

      public void setTimestamp(String timestamp)
      Parameters:
      timestamp - see getTimestamp()
    • getEntity

      public EntityPrice getEntity()
      Returns:
      Price entity object associated with the current price or null if not set.
    • setEntity

      public void setEntity(EntityPrice entityPrice)
      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:
      getSequence in interface GetSequence
      Returns:
      ordered position within a list sequenceable objects
    • setSequence

      public void setSequence(int sequence)
      Parameters:
      sequence - see getSequence()
    • getContext

      public Context getContext()
      Get the context for this element or null if not set.
      Specified by:
      getContext in interface EntityData
      Specified by:
      getContext in interface GetContext
      Returns:
      context
    • setContext

      public void setContext(Context context)
      Description copied from interface: EntityData
      set the context of entity data object
      Specified by:
      setContext in interface EntityData
      Parameters:
      context - getContext()
    • getBucket

      public Bucket getBucket()
      Returns:
      Parent bucket that this price is related to.
    • setBucket

      public void setBucket(Bucket bucket)
      Parameters:
      bucket - getBucket()
    • getLabel

      public String getLabel()
      Display label for the price.
      Returns:
      label or null if not set
    • setLabel

      public void setLabel(String label)
      Parameters:
      label - see getLabel()
    • getAmount

      public String getAmount()
      Amount

      There is not special format for amounts, because this can have very different representations.

      Returns:
      amount
    • setAmount

      public void setAmount(String amount)
      Parameters:
      amount - getAmount()
    • getValidFrom

      public Date getValidFrom()
      Returns:
      Price is valid from
    • setValidFrom

      public void setValidFrom(Date validFrom)
      Parameters:
      validFrom - getValidFrom()
    • getValidTo

      public Date getValidTo()
      Returns:
      Price is valid to
    • setValidTo

      public void setValidTo(Date validTo)
      Parameters:
      validTo - getValidTo()
    • getConnectorEntity

      public ConnectorEntity getConnectorEntity()
      Returns:
      connector entity object or null if not set
    • setConnectorEntity

      public void setConnectorEntity(ConnectorEntity connectorEntity)
      Parameters:
      connectorEntity - see getConnectorEntity()
    • getEntityPriceId

      public String getEntityPriceId()
      Returns:
      Identifier of related entity in entity model.
    • setEntityPriceId

      public void setEntityPriceId(String entityPriceId)
      Sets entityPriceId and eventually removes current entityPrice if it does not match the id
      Parameters:
      entityPriceId - getEntityPriceId()
      Since:
      4.0.0
    • getBucketId

      public String 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

      public void setBucketId(String bucketId)
      Parameters:
      bucketId - getBucketId()
    • getPrice

      public String getPrice()
      Get a price object.

      There is not special format for prices, because this can have very different representations.

      Returns:
      Price
    • setPrice

      public void setPrice(String price)
      Parameters:
      price - getPrice()
    • getCurrency

      public String getCurrency()
      Returns:
      Currency of Price
    • setCurrency

      public void setCurrency(String currency)
      Parameters:
      currency - getCurrency()
    • getPriceUnit

      public String getPriceUnit()
      Returns:
      like Piece, Bottle, Meter,..
    • setPriceUnit

      public void setPriceUnit(String priceUnit)
      Parameters:
      priceUnit - getPriceUnit()
    • getPackagingUnit

      public String getPackagingUnit()
      Returns:
      Packages like Box of Bottles: Box
    • setPackagingUnit

      public void setPackagingUnit(String packagingUnit)
      Parameters:
      packagingUnit - getPackagingUnit()
    • getQuantityOfPackingUnit

      public String getQuantityOfPackingUnit()
      Returns:
      Number of units in a package like 6 Bottles in a Box: 6
    • setQuantityOfPackingUnit

      public void setQuantityOfPackingUnit(String quantityOfPackingUnit)
      Parameters:
      quantityOfPackingUnit - getQuantityOfPackingUnit()
    • getItemPrice

      public String getItemPrice()
      Returns:
      Price of a priceUnit
    • setItemPrice

      public void setItemPrice(String itemPrice)
      Parameters:
      itemPrice - getItemPrice()
    • getMinOrderQuantity

      public String getMinOrderQuantity()
      Returns:
      Minimal order quantity
    • setMinOrderQuantity

      public void setMinOrderQuantity(String minOrderQuantity)
      Parameters:
      minOrderQuantity - getMinOrderQuantity()
    • getOldPrice

      public String getOldPrice()
      Returns:
      Old price
    • setOldPrice

      public void setOldPrice(String oldPrice)
      Parameters:
      oldPrice - getOldPrice()
    • getOldItemPrice

      public String getOldItemPrice()
      Returns:
      Old price of an item
    • setOldItemPrice

      public void setOldItemPrice(String oldItemPrice)
      Parameters:
      oldItemPrice - getOldItemPrice()
    • getListPrice

      public String getListPrice()
      Returns:
      list price
    • setListPrice

      public void setListPrice(String listPrice)
      Parameters:
      listPrice - getListPrice()
    • getMetaData

      public List<KeyValue> getMetaData()
      Returns:
      List of meta data related to the bucket or empty list.

      List is LAZY loaded.

    • setMetaData

      public void setMetaData(List<KeyValue> metaData)
      Parameters:
      metaData - see getMetaData()
    • getCreatedBy

      public String getCreatedBy()
      Returns:
      creation user or null if not set
    • setCreatedBy

      public void setCreatedBy(String createdBy)
      Parameters:
      createdBy - see getCreatedBy()
    • getCreatedOn

      public Date getCreatedOn()
      Returns:
      creation date or null if not set
    • setCreatedOn

      public void setCreatedOn(Date createdOn)
      Parameters:
      createdOn - see getCreatedOn()
    • getUpdatedBy

      public String getUpdatedBy()
      Returns:
      last modified user or null if not set
    • setUpdatedBy

      public void setUpdatedBy(String updatedBy)
      Parameters:
      updatedBy - see getUpdatedBy()
    • getUpdatedOn

      public Date getUpdatedOn()
      Returns:
      last modified date or null if not set
    • setUpdatedOn

      public void setUpdatedOn(Date updatedOn)
      Parameters:
      updatedOn - see getUpdatedOn()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOrigin

      public String 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

      public void setOrigin(String origin)
      Parameters:
      origin - getOrigin()
    • getEntityIdentifier

      public String getEntityIdentifier()
      Description copied from interface: EntityData
      Identifier of an entity in the entity model where the current object refers to.
      Specified by:
      getEntityIdentifier in interface EntityData
      Returns:
      entity identifier as string
    • setEntityIdentifier

      public void setEntityIdentifier(String entityIdentifier)
      Description copied from interface: EntityData
      Identifier of an entity in the entity model where the current object refers to.
      Specified by:
      setEntityIdentifier in interface EntityData
    • getContentMetaData

      public List<ContentMetaData> 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

      public void setContentMetaData(List<ContentMetaData> contentMetaData)
      Parameters:
      contentMetaData - getContentMetaData()