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


Java IdDt.hasResourceType方法代码示例

本文整理汇总了Java中ca.uhn.fhir.model.primitive.IdDt.hasResourceType方法的典型用法代码示例。如果您正苦于以下问题:Java IdDt.hasResourceType方法的具体用法?Java IdDt.hasResourceType怎么用?Java IdDt.hasResourceType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca.uhn.fhir.model.primitive.IdDt的用法示例。


在下文中一共展示了IdDt.hasResourceType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: invokeClient

import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public BaseHttpClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
	IdDt idDt = (IdDt) theArgs[myIdParameterIndex];
	if (idDt == null) {
		throw new NullPointerException("ID can not be null");
	}
	
	if (idDt.hasResourceType()==false) {
		idDt = idDt.withResourceType(getResourceName());
	}else if (getResourceName().equals(idDt.getResourceType())==false) {
		throw new InvalidRequestException("ID parameter has the wrong resource type, expected '" + getResourceName() + "', found: " + idDt.getResourceType());
	}
	
	HttpDeleteClientInvocation retVal = createDeleteInvocation(idDt);

	for (int idx = 0; idx < theArgs.length; idx++) {
		IParameter nextParam = getParameters().get(idx);
		nextParam.translateClientArgumentIntoQueryArgument(getContext(), theArgs[idx], null, null);
	}

	return retVal;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:23,代码来源:DeleteMethodBinding.java

示例2: 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

示例3: 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

示例4: onInstance

import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
@Override
public IHistoryUntyped onInstance(IdDt theId) {
	if (theId.hasResourceType() == false) {
		throw new IllegalArgumentException("Resource ID does not have a resource type: " + theId.getValue());
	}
	myId = theId;
	return this;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:9,代码来源:GenericClient.java

示例5: validateResourceTypeAndThrowIllegalArgumentException

import ca.uhn.fhir.model.primitive.IdDt; //导入方法依赖的package包/类
private void validateResourceTypeAndThrowIllegalArgumentException(IdDt theId) {
	if (theId.hasResourceType() && !theId.getResourceType().equals(myResourceName)) {
		throw new IllegalArgumentException("Incorrect resource type (" + theId.getResourceType() + ") for this DAO, wanted: " + myResourceName);
	}
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:6,代码来源:BaseFhirResourceDao.java


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