Skip to content

Commit

Permalink
Replace explicit constructor with generated CIRC-1416
Browse files Browse the repository at this point in the history
  • Loading branch information
marcjohnson-kint committed Jun 22, 2022
1 parent 9a701ac commit dd22a74
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions src/main/java/org/folio/circulation/domain/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit dd22a74

Please sign in to comment.