Package org.ehrbase.api.service
Record Class EhrService.EhrResult
java.lang.Object
java.lang.Record
org.ehrbase.api.service.EhrService.EhrResult
- Record Components:
ehrId-IDof the createdEHRstatusVersionId- theObjectVersionIdof the @EhrStatusDtostatus- initialEhrStatusDtoversion
- Enclosing interface:
EhrService
public static record EhrService.EhrResult(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId statusVersionId, EhrStatusDto status)
extends Record
Wrapper for
EhrService.create(UUID, EhrStatusDto) response that contains the EHR id as well as the
EhrStatusDto and it's ObjectVersionId. This prevents to call EhrService.getEhrStatus(UUID) with an
additional DB round trip.-
Constructor Summary
ConstructorsConstructorDescriptionEhrResult(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId statusVersionId, EhrStatusDto status) Creates an instance of aEhrResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionehrId()Returns the value of theehrIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.status()Returns the value of thestatusrecord component.com.nedap.archie.rm.support.identification.ObjectVersionIdReturns the value of thestatusVersionIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EhrResult
public EhrResult(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId statusVersionId, EhrStatusDto status) Creates an instance of aEhrResultrecord class.- Parameters:
ehrId- the value for theehrIdrecord componentstatusVersionId- the value for thestatusVersionIdrecord componentstatus- the value for thestatusrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
ehrId
Returns the value of theehrIdrecord component.- Returns:
- the value of the
ehrIdrecord component
-
statusVersionId
public com.nedap.archie.rm.support.identification.ObjectVersionId statusVersionId()Returns the value of thestatusVersionIdrecord component.- Returns:
- the value of the
statusVersionIdrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-