fix test
This commit is contained in:
parent
5bc571d97d
commit
e77d84d008
|
@ -21,6 +21,7 @@ package ca.uhn.fhir.rest.api.server.storage;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import ca.uhn.fhir.util.ObjectUtil;
|
import ca.uhn.fhir.util.ObjectUtil;
|
||||||
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -125,4 +126,12 @@ public class ResourcePersistentId {
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ResourcePersistentId fromResource(IBaseResource theResource) {
|
||||||
|
IIdType id = theResource.getIdElement();
|
||||||
|
ResourcePersistentId retval = new ResourcePersistentId(id.getIdPart());
|
||||||
|
retval.setAssociatedResourceId(id);
|
||||||
|
retval.setVersion(id.getVersionIdPartAsLong());
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue