Package edu.yu.marketmaker.persistence
Class ExternalOrderEntity
java.lang.Object
edu.yu.marketmaker.persistence.ExternalOrderEntity
- All Implemented Interfaces:
IdentifiableEntity<UUID>
JPA Entity for ExternalOrder records used by Hazelcast MapStore.
-
Constructor Summary
ConstructorsConstructorDescriptionNo-args constructor required by JPA.ExternalOrderEntity(UUID id, String symbol, int quantity, double limitPrice, Side side) Constructor for ExternalOrderEntity. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExternalOrderEntityfromRecord(ExternalOrder order) Static helper to create an Entity from a Record.getId()Returns the unique identifier for this entity.doubleintgetSide()voidvoidsetLimitPrice(double limitPrice) voidsetQuantity(int quantity) voidvoidtoRecord()Converts this JPA entity back into the immutable ExternalOrder record.toString()
-
Constructor Details
-
ExternalOrderEntity
public ExternalOrderEntity()No-args constructor required by JPA. -
ExternalOrderEntity
Constructor for ExternalOrderEntity.- Parameters:
id- unique identifiersymbol- tickerquantity- number of shareslimitPrice- limit priceside- buy or sell
-
-
Method Details
-
getId
Returns the unique identifier for this entity.- Specified by:
getIdin interfaceIdentifiableEntity<UUID>- Returns:
-
toRecord
Converts this JPA entity back into the immutable ExternalOrder record.- Returns:
- An ExternalOrder record.
-
fromRecord
Static helper to create an Entity from a Record.- Parameters:
order- The external order record.- Returns:
- A new ExternalOrderEntity.
-
setId
-
getSymbol
-
setSymbol
-
getQuantity
public int getQuantity() -
setQuantity
public void setQuantity(int quantity) -
getLimitPrice
public double getLimitPrice() -
setLimitPrice
public void setLimitPrice(double limitPrice) -
getSide
-
setSide
-
toString
-