Package edu.yu.marketmaker.persistence
Class QuoteEntity
java.lang.Object
edu.yu.marketmaker.persistence.QuoteEntity
- All Implemented Interfaces:
IdentifiableEntity<UUID>
JPA Entity for Quote records used by Hazelcast MapStore.
-
Constructor Summary
ConstructorsConstructorDescriptionNo-args constructor required by JPA.QuoteEntity(UUID quoteId, String symbol, double bidPrice, int bidQuantity, double askPrice, int askQuantity, long expiresAt) All-args constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteEntityfromRecord(Quote quote) Static helper to create an Entity from a Record.doubleintdoubleintlonggetId()Returns the unique identifier for this entity.voidsetAskPrice(double askPrice) voidsetAskQuantity(int askQuantity) voidsetBidPrice(double bidPrice) voidsetBidQuantity(int bidQuantity) voidsetExpiresAt(long expiresAt) voidsetQuoteId(UUID quoteId) voidtoRecord()Converts this JPA entity back into the immutable Quote record.toString()
-
Constructor Details
-
Method Details
-
getId
Description copied from interface:IdentifiableEntityReturns the unique identifier for this entity.- Specified by:
getIdin interfaceIdentifiableEntity<UUID>- Returns:
- the unique key
-
toRecord
Converts this JPA entity back into the immutable Quote record.- Returns:
- A Quote record.
-
fromRecord
Static helper to create an Entity from a Record.- Parameters:
quote- The quote record.- Returns:
- A new QuoteEntity.
-
getQuoteId
-
setQuoteId
-
getSymbol
-
setSymbol
-
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
-