-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(consortium-search): Implement consolidated items/holdings search
- Implement endpoints by id - Implement batch endpoints by ids Implements: MSEARCH-759
- Loading branch information
1 parent
13e1fac
commit c5f5ca5
Showing
23 changed files
with
680 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/org/folio/search/converter/ConsortiumHoldingMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.folio.search.converter; | ||
|
||
import org.folio.search.domain.dto.ConsortiumHolding; | ||
import org.folio.search.domain.dto.Holding; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ConsortiumHoldingMapper { | ||
|
||
public ConsortiumHolding map(String instanceId, Holding holding) { | ||
return new ConsortiumHolding() | ||
.id(holding.getId()) | ||
.hrid(holding.getHrid()) | ||
.tenantId(holding.getTenantId()) | ||
.instanceId(instanceId) | ||
.callNumberPrefix(holding.getCallNumberPrefix()) | ||
.callNumber(holding.getCallNumber()) | ||
.callNumberSuffix(holding.getCallNumberSuffix()) | ||
.copyNumber(holding.getCopyNumber()) | ||
.permanentLocationId(holding.getPermanentLocationId()) | ||
.discoverySuppress(holding.getDiscoverySuppress() != null && holding.getDiscoverySuppress()); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/org/folio/search/converter/ConsortiumItemMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.folio.search.converter; | ||
|
||
import org.folio.search.domain.dto.ConsortiumItem; | ||
import org.folio.search.domain.dto.Item; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ConsortiumItemMapper { | ||
|
||
public ConsortiumItem map(String instanceId, Item item) { | ||
return new ConsortiumItem() | ||
.id(item.getId()) | ||
.hrid(item.getHrid()) | ||
.tenantId(item.getTenantId()) | ||
.instanceId(instanceId) | ||
.holdingsRecordId(item.getHoldingsRecordId()) | ||
.barcode(item.getBarcode()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.