当前位置: 首页>>代码示例>>Java>>正文


Java IdDt.hasIdPart方法代码示例

本文整理汇总了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;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:12,代码来源:GenericClient.java

示例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;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:10,代码来源:GenericClient.java

示例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;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:12,代码来源:GenericClient.java

示例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);
	}
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:12,代码来源:BaseFhirDao.java

示例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;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:61,代码来源:SearchMethodBinding.java


注:本文中的ca.uhn.fhir.model.primitive.IdDt.hasIdPart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。