use of org.folio.circulation.domain.notice.session.PatronActionSessionProperties.ID in project mod-circulation by folio-org.
the class PatronSessionRecord method from.
public static PatronSessionRecord from(JsonObject representation) {
UUID id = getUUIDProperty(representation, ID);
UUID patronId = getUUIDProperty(representation, PATRON_ID);
UUID loanId = getUUIDProperty(representation, LOAN_ID);
String actionTypeValue = getProperty(representation, ACTION_TYPE);
return PatronActionType.from(actionTypeValue).map(patronActionType -> new PatronSessionRecord(id, patronId, loanId, patronActionType)).orElse(null);
}
Also used :
PATRON_ID(org.folio.circulation.domain.notice.session.PatronActionSessionProperties.PATRON_ID)
ID(org.folio.circulation.domain.notice.session.PatronActionSessionProperties.ID)
ACTION_TYPE(org.folio.circulation.domain.notice.session.PatronActionSessionProperties.ACTION_TYPE)
Objects.requireNonNull(java.util.Objects.requireNonNull)
Loan(org.folio.circulation.domain.Loan)
JsonObject(io.vertx.core.json.JsonObject)
LOAN_ID(org.folio.circulation.domain.notice.session.PatronActionSessionProperties.LOAN_ID)
UUID(java.util.UUID)
JsonPropertyFetcher.getUUIDProperty(org.folio.circulation.support.json.JsonPropertyFetcher.getUUIDProperty)
JsonPropertyFetcher.getProperty(org.folio.circulation.support.json.JsonPropertyFetcher.getProperty)
UUID(java.util.UUID)