Record Class PostgresPlanRevisionData
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.merlin.server.remotes.postgres.PostgresPlanRevisionData
- All Implemented Interfaces:
RevisionData
public record PostgresPlanRevisionData(long modelRevision, long planRevision, long simulationRevision, Optional<Long> templateRevision)
extends Record
implements RevisionData
-
Nested Class Summary
Nested classes/interfaces inherited from interface gov.nasa.jpl.aerie.merlin.server.services.RevisionData
RevisionData.MatchResult -
Constructor Summary
ConstructorsConstructorDescriptionPostgresPlanRevisionData(long modelRevision, long planRevision, long simulationRevision, Optional<Long> templateRevision) Creates an instance of aPostgresPlanRevisionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.matches(RevisionData other) longReturns the value of themodelRevisionrecord component.longReturns the value of theplanRevisionrecord component.longReturns the value of thesimulationRevisionrecord component.Returns the value of thetemplateRevisionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PostgresPlanRevisionData
public PostgresPlanRevisionData(long modelRevision, long planRevision, long simulationRevision, Optional<Long> templateRevision) Creates an instance of aPostgresPlanRevisionDatarecord class.- Parameters:
modelRevision- the value for themodelRevisionrecord componentplanRevision- the value for theplanRevisionrecord componentsimulationRevision- the value for thesimulationRevisionrecord componenttemplateRevision- the value for thetemplateRevisionrecord component
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceRevisionData
-
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 '=='. -
modelRevision
public long modelRevision()Returns the value of themodelRevisionrecord component.- Returns:
- the value of the
modelRevisionrecord component
-
planRevision
public long planRevision()Returns the value of theplanRevisionrecord component.- Returns:
- the value of the
planRevisionrecord component
-
simulationRevision
public long simulationRevision()Returns the value of thesimulationRevisionrecord component.- Returns:
- the value of the
simulationRevisionrecord component
-
templateRevision
Returns the value of thetemplateRevisionrecord component.- Returns:
- the value of the
templateRevisionrecord component
-