Package com.v1rex.liftnexus.loadunit.dto
Record Class LoadUnitRequest
java.lang.Object
java.lang.Record
com.v1rex.liftnexus.loadunit.dto.LoadUnitRequest
public record LoadUnitRequest(@NotBlank(message="Tracking code is required") String trackingCode, @jakarta.validation.constraints.Min(value=0L, message="Weight cannot be negative") int weightKg, @NotNull(message="Initial status is required") LoadUnitStatus status, Long currentStorageBinId)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionLoadUnitRequest(@NotBlank(message="Tracking code is required") String trackingCode, @jakarta.validation.constraints.Min(value=0L, message="Weight cannot be negative") int weightKg, @NotNull(message="Initial status is required") LoadUnitStatus status, Long currentStorageBinId) Creates an instance of aLoadUnitRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentStorageBinIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull(message="Initial status is required") LoadUnitStatusstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.@NotBlank(message="Tracking code is required") StringReturns the value of thetrackingCoderecord component.@jakarta.validation.constraints.Min(value=0L, message="Weight cannot be negative") intweightKg()Returns the value of theweightKgrecord component.
-
Constructor Details
-
LoadUnitRequest
public LoadUnitRequest(@NotBlank(message="Tracking code is required") @NotBlank(message="Tracking code is required") String trackingCode, @Min(value=0L,message="Weight cannot be negative") @jakarta.validation.constraints.Min(value=0L, message="Weight cannot be negative") int weightKg, @NotNull(message="Initial status is required") @NotNull(message="Initial status is required") LoadUnitStatus status, Long currentStorageBinId) Creates an instance of aLoadUnitRequestrecord class.- Parameters:
trackingCode- the value for thetrackingCoderecord componentweightKg- the value for theweightKgrecord componentstatus- the value for thestatusrecord componentcurrentStorageBinId- the value for thecurrentStorageBinIdrecord component
-
-
Method Details
-
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 '=='. -
trackingCode
@NotBlank(message="Tracking code is required") public @NotBlank(message="Tracking code is required") String trackingCode()Returns the value of thetrackingCoderecord component.- Returns:
- the value of the
trackingCoderecord component
-
weightKg
@Min(value=0L, message="Weight cannot be negative") public @jakarta.validation.constraints.Min(value=0L, message="Weight cannot be negative") int weightKg()Returns the value of theweightKgrecord component.- Returns:
- the value of the
weightKgrecord component
-
status
@NotNull(message="Initial status is required") public @NotNull(message="Initial status is required") LoadUnitStatus status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
currentStorageBinId
Returns the value of thecurrentStorageBinIdrecord component.- Returns:
- the value of the
currentStorageBinIdrecord component
-