Package edu.yu.marketmaker.persistence
Class ReservationEntity
java.lang.Object
edu.yu.marketmaker.persistence.ReservationEntity
- All Implemented Interfaces:
IdentifiableEntity<UUID>
JPA Entity for Reservation records used by Hazelcast MapStore.
-
Constructor Summary
ConstructorsConstructorDescriptionNo-args constructor required by JPA.ReservationEntity(UUID id, String symbol, int requested, int granted, ReservationStatus status) All-args constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReservationEntityfromRecord(Reservation reservation) Static helper to create an Entity from a Record.intgetId()Returns the unique identifier for this entity.intvoidsetGranted(int granted) voidvoidsetRequested(int requested) voidsetStatus(ReservationStatus status) voidtoRecord()Converts this JPA entity back into the immutable Reservation record.toString()
-
Constructor Details
-
ReservationEntity
public ReservationEntity()No-args constructor required by JPA. -
ReservationEntity
public ReservationEntity(UUID id, String symbol, int requested, int granted, ReservationStatus status) All-args constructor.
-
-
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 Reservation record.- Returns:
- A Reservation record.
-
fromRecord
Static helper to create an Entity from a Record.- Parameters:
reservation- The reservation record.- Returns:
- A new ReservationEntity.
-
setId
-
getSymbol
-
setSymbol
-
getRequested
public int getRequested() -
setRequested
public void setRequested(int requested) -
getGranted
public int getGranted() -
setGranted
public void setGranted(int granted) -
getStatus
-
setStatus
-
toString
-