本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}