Class QuoteEntity

java.lang.Object
edu.yu.marketmaker.persistence.QuoteEntity
All Implemented Interfaces:
IdentifiableEntity<UUID>

@Entity public class QuoteEntity extends Object implements IdentifiableEntity<UUID>
JPA Entity for Quote records used by Hazelcast MapStore.
  • Constructor Details

    • QuoteEntity

      public QuoteEntity()
      No-args constructor required by JPA.
    • QuoteEntity

      public QuoteEntity(UUID quoteId, String symbol, double bidPrice, int bidQuantity, double askPrice, int askQuantity, long expiresAt)
      All-args constructor.
  • Method Details

    • getId

      public UUID getId()
      Description copied from interface: IdentifiableEntity
      Returns the unique identifier for this entity.
      Specified by:
      getId in interface IdentifiableEntity<UUID>
      Returns:
      the unique key
    • toRecord

      public Quote toRecord()
      Converts this JPA entity back into the immutable Quote record.
      Returns:
      A Quote record.
    • fromRecord

      public static QuoteEntity fromRecord(Quote quote)
      Static helper to create an Entity from a Record.
      Parameters:
      quote - The quote record.
      Returns:
      A new QuoteEntity.
    • getQuoteId

      public UUID getQuoteId()
    • setQuoteId

      public void setQuoteId(UUID quoteId)
    • getSymbol

      public String getSymbol()
    • setSymbol

      public void setSymbol(String symbol)
    • getBidPrice

      public double getBidPrice()
    • setBidPrice

      public void setBidPrice(double bidPrice)
    • getBidQuantity

      public int getBidQuantity()
    • setBidQuantity

      public void setBidQuantity(int bidQuantity)
    • getAskPrice

      public double getAskPrice()
    • setAskPrice

      public void setAskPrice(double askPrice)
    • getAskQuantity

      public int getAskQuantity()
    • setAskQuantity

      public void setAskQuantity(int askQuantity)
    • getExpiresAt

      public long getExpiresAt()
    • setExpiresAt

      public void setExpiresAt(long expiresAt)
    • toString

      public String toString()
      Overrides:
      toString in class Object