Class FactPurchase


  • public class FactPurchase
    extends java.lang.Object
    Represents a purchase record. In our snowflake schema purchase is a 'fact' and will be cached in larger CacheMode.PARTITIONED cache.
    • Constructor Summary

      Constructors 
      Constructor Description
      FactPurchase​(int id, int productId, int storeId, float purchasePrice)
      Constructs a purchase record.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getId()
      Gets purchase ID.
      int getProductId()
      Gets purchased product ID.
      float getPurchasePrice()
      Gets purchase price.
      int getStoreId()
      Gets ID of store at which purchase was made.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FactPurchase

        public FactPurchase​(int id,
                            int productId,
                            int storeId,
                            float purchasePrice)
        Constructs a purchase record.
        Parameters:
        id - Purchase ID.
        productId - Purchased product ID.
        storeId - Store ID.
        purchasePrice - Purchase price.
    • Method Detail

      • getId

        public int getId()
        Gets purchase ID.
        Returns:
        Purchase ID.
      • getProductId

        public int getProductId()
        Gets purchased product ID.
        Returns:
        Product ID.
      • getStoreId

        public int getStoreId()
        Gets ID of store at which purchase was made.
        Returns:
        Store ID.
      • getPurchasePrice

        public float getPurchasePrice()
        Gets purchase price.
        Returns:
        Purchase price.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object