From dd22a7439cf6ad2125ed7a6467c081e28faf7b79 Mon Sep 17 00:00:00 2001 From: Marc Johnson Date: Tue, 10 May 2022 11:45:23 +0100 Subject: [PATCH] Replace explicit constructor with generated CIRC-1416 --- .../org/folio/circulation/domain/Item.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/folio/circulation/domain/Item.java b/src/main/java/org/folio/circulation/domain/Item.java index 88d22bd111..bc3cd27dd8 100644 --- a/src/main/java/org/folio/circulation/domain/Item.java +++ b/src/main/java/org/folio/circulation/domain/Item.java @@ -18,8 +18,10 @@ import org.folio.circulation.storage.mappers.ItemMapper; import io.vertx.core.json.JsonObject; +import lombok.AllArgsConstructor; import lombok.NonNull; +@AllArgsConstructor public class Item { private final String id; @NonNull private final Location location; @@ -50,28 +52,7 @@ public static Item unknown(String id) { public static Item from(JsonObject representation) { return new ItemMapper().toDomain(representation); } - public Item(String id, Location effectiveLocation, - LastCheckIn lastCheckIn, CallNumberComponents callNumberComponents, - Location permanentLocation, ServicePoint inTransitDestinationServicePoint, - boolean changed, Holdings holdings, Instance instance, - MaterialType materialType, LoanType loanType, - ItemDescription description, ItemStatus status) { - - this.id = id; - this.location = effectiveLocation; - this.lastCheckIn = lastCheckIn; - this.callNumberComponents = callNumberComponents; - this.permanentLocation = permanentLocation; - this.inTransitDestinationServicePoint = inTransitDestinationServicePoint; - this.changed = changed; - this.holdings = holdings; - this.instance = instance; - this.materialType = materialType; - this.loanType = loanType; - this.description = description; - this.status = status; - } - + public boolean isCheckedOut() { return isInStatus(CHECKED_OUT); }