Package edu.yu.marketmaker.model
Record Class Reservation
java.lang.Object
java.lang.Record
edu.yu.marketmaker.model.Reservation
- All Implemented Interfaces:
Identifiable<UUID>,Serializable
public record Reservation(UUID id, String symbol, int requested, int granted, ReservationStatus status)
extends Record
implements Identifiable<UUID>, Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReservation(UUID id, String symbol, int requested, int granted, ReservationStatus status) Creates an instance of aReservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getId()Returns the unique identifier for this entity.intgranted()Returns the value of thegrantedrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of therequestedrecord component.status()Returns the value of thestatusrecord component.symbol()Returns the value of thesymbolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Reservation
Creates an instance of aReservationrecord class.- Parameters:
id- the value for theidrecord componentsymbol- the value for thesymbolrecord componentrequested- the value for therequestedrecord componentgranted- the value for thegrantedrecord componentstatus- the value for thestatusrecord component
-
-
Method Details
-
getId
Description copied from interface:IdentifiableReturns the unique identifier for this entity.- Specified by:
getIdin interfaceIdentifiable<UUID>- Returns:
- the unique key
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
symbol
Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
requested
public int requested()Returns the value of therequestedrecord component.- Returns:
- the value of the
requestedrecord component
-
granted
public int granted()Returns the value of thegrantedrecord component.- Returns:
- the value of the
grantedrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-