本文整理汇总了Java中ca.uhn.fhir.model.primitive.IdDt.hasIdPart方法的典型用法代码示例。如果您正苦于以下问题:Java IdDt.hasIdPart方法的具体用法?Java IdDt.hasIdPart怎么用?Java IdDt.hasIdPart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca.uhn.fhir.model.primitive.IdDt
的用法示例。
在下文中一共展示了IdDt.hasIdPart方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resource
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public IDeleteTyped resource(IResource theResource) {
Validate.notNull(theResource, "theResource can not be null");
IdDt id = theResource.getId();
Validate.notNull(id, "theResource.getId() can not be null");
if (id.hasResourceType() == false || id.hasIdPart() == false) {
throw new IllegalArgumentException("theResource.getId() must contain a resource type and logical ID at a minimum (e.g. Patient/1234), found: " + id.getValue());
}
myId = id;
return this;
}
示例2: resourceById
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public IDeleteTyped resourceById(IdDt theId) {
Validate.notNull(theId, "theId can not be null");
if (theId.hasResourceType() == false || theId.hasIdPart() == false) {
throw new IllegalArgumentException("theId must contain a resource type and logical ID at a minimum (e.g. Patient/1234)found: " + theId.getValue());
}
myId = theId;
return this;
}
示例3: withId
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public IUpdateExecutable withId(IdDt theId) {
if (theId == null) {
throw new NullPointerException("theId can not be null");
}
if (theId.hasIdPart() == false) {
throw new NullPointerException("theId must not be blank and must contain an ID, found: " + theId.getValue());
}
myId = theId;
return this;
}
示例4: createForcedIdIfNeeded
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
protected void createForcedIdIfNeeded(ResourceTable entity, IdDt id) {
if (id.isEmpty() == false && id.hasIdPart()) {
if (isValidPid(id)) {
return;
}
ForcedId fid = new ForcedId();
fid.setForcedId(id.getIdPart());
fid.setResource(entity);
entity.setForcedId(fid);
}
}
示例5: createSearchInvocation
import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
public static BaseHttpClientInvocation createSearchInvocation(FhirContext theContext, String theResourceName, Map<String, List<String>> theParameters, IdDt theId, String theCompartmentName,
SearchStyleEnum theSearchStyle) {
SearchStyleEnum searchStyle = theSearchStyle;
if (searchStyle == null) {
int length = 0;
for (Entry<String, List<String>> nextEntry : theParameters.entrySet()) {
length += nextEntry.getKey().length();
for (String next : nextEntry.getValue()) {
length += next.length();
}
}
if (length < 5000) {
searchStyle = SearchStyleEnum.GET;
} else {
searchStyle = SearchStyleEnum.POST;
}
}
BaseHttpClientInvocation invocation;
boolean compartmentSearch = false;
if (theCompartmentName != null) {
if (theId == null || !theId.hasIdPart()) {
String msg = theContext.getLocalizer().getMessage(SearchMethodBinding.class.getName() + ".idNullForCompartmentSearch");
throw new InvalidRequestException(msg);
} else {
compartmentSearch = true;
}
}
/*
* Are we doing a get (GET [base]/Patient?name=foo) or a get with search (GET [base]/Patient/_search?name=foo) or a post (POST [base]/Patient with parameters in the POST body)
*/
switch (searchStyle) {
case GET:
default:
if (compartmentSearch) {
invocation = new HttpGetClientInvocation(theParameters, theResourceName, theId.getIdPart(), theCompartmentName);
} else {
invocation = new HttpGetClientInvocation(theParameters, theResourceName);
}
break;
case GET_WITH_SEARCH:
if (compartmentSearch) {
invocation = new HttpGetClientInvocation(theParameters, theResourceName, theId.getIdPart(), theCompartmentName, Constants.PARAM_SEARCH);
} else {
invocation = new HttpGetClientInvocation(theParameters, theResourceName, Constants.PARAM_SEARCH);
}
break;
case POST:
if (compartmentSearch) {
invocation = new HttpPostClientInvocation(theContext, theParameters, theResourceName, theId.getIdPart(), theCompartmentName, Constants.PARAM_SEARCH);
} else {
invocation = new HttpPostClientInvocation(theContext, theParameters, theResourceName, Constants.PARAM_SEARCH);
}
}
return invocation;
}