@Override public void applyTo(IBaseResource theResouce) { if (theResouce == null) { throw new NullPointerException("theResource can not be null"); } else if (theResouce instanceof IResource) { ((IResource) theResouce).setId(new IdDt(getValue())); } else if (theResouce instanceof IAnyResource) { ((IAnyResource) theResouce).setId(getValue()); } else { throw new IllegalArgumentException("Unknown resource class type, does not implement IResource or extend Resource"); } }
@SuppressWarnings("unchecked") @Override public IPrimitiveType<Date> get(IAnyResource theResource) { return (IPrimitiveType<Date>) theResource.getUserData(DELETED_AT.name()); }
if (nextRes.getIdElement().hasIdPart()) { if (containedIds.contains(nextRes.getIdElement().getValue())) { IIdType id = nextRes.getIdElement(); if (id.hasResourceType() == false) { String resName = myContext.getResourceDefinition(nextRes).getName();
res.getMeta().getTag().clear(); res.getMeta().getProfile().clear(); res.getMeta().getSecurity().clear(); res.getMeta().setLastUpdated(null); res.getMeta().setVersionId(null); res.setId(res.getIdElement().withVersion(theVersion.toString())); res.getMeta().setLastUpdated(theEntity.getUpdatedDate()); IDao.RESOURCE_PID.put(res, theEntity.getId()); switch (next.getTag().getTagType()) { case PROFILE: res.getMeta().addProfile(next.getTag().getCode()); break; case SECURITY_LABEL: IBaseCoding sec = res.getMeta().addSecurity(); sec.setSystem(next.getTag().getSystem()); sec.setCode(next.getTag().getCode()); break; case TAG: IBaseCoding tag = res.getMeta().addTag(); tag.setSystem(next.getTag().getSystem()); tag.setCode(next.getTag().getCode());
if (nextContained.getId().isEmpty() == false) { containedIds.add(nextContained.getIdElement().getValue());
@Override public void put(IAnyResource theResource, String theObject) { theResource.setUserData(ENTRY_SEARCH_MODE.name(), theObject); } };
IAnyResource nextRes = (IAnyResource) nextRef.getResource(); if (nextRes != null) { if (nextRes.getIdElement().hasIdPart()) { if (containedIds.contains(nextRes.getIdElement().getValue())) { IIdType id = nextRes.getIdElement(); if (id.hasResourceType() == false) { String resName = myContext.getResourceDefinition(nextRes).getName();
res.getMeta().getTag().clear(); res.getMeta().getProfile().clear(); res.getMeta().getSecurity().clear(); res.getMeta().setLastUpdated(null); res.getMeta().setVersionId(null); res.setId(res.getIdElement().withVersion(theVersion.toString())); res.getMeta().setLastUpdated(theEntity.getUpdatedDate()); IDao.RESOURCE_PID.put(res, theEntity.getId()); switch (next.getTag().getTagType()) { case PROFILE: res.getMeta().addProfile(next.getTag().getCode()); break; case SECURITY_LABEL: IBaseCoding sec = res.getMeta().addSecurity(); sec.setSystem(next.getTag().getSystem()); sec.setCode(next.getTag().getCode()); break; case TAG: IBaseCoding tag = res.getMeta().addTag(); tag.setSystem(next.getTag().getSystem()); tag.setCode(next.getTag().getCode());
if (nextContained.getId().isEmpty() == false) { containedIds.add(nextContained.getIdElement().getValue());
@Override public void put(IAnyResource theResource, IPrimitiveType<Date> theObject) { theResource.setUserData(DELETED_AT.name(), theObject); } };
IAnyResource nextRes = (IAnyResource) nextRef.getResource(); if (nextRes != null) { if (nextRes.getIdElement().hasIdPart()) { if (containedIds.contains(nextRes.getIdElement().getValue())) { IIdType id = nextRes.getIdElement(); if (id.hasResourceType() == false) { String resName = myContext.getResourceDefinition(nextRes).getName();
@Override public List<IBaseResource> toListOfResources() { ArrayList<IBaseResource> retVal = new ArrayList<IBaseResource>(); for (BundleEntryComponent next : myBundle.getEntry()) { if (next.getResource() != null) { retVal.add(next.getResource()); } else if (next.getResponse().getLocationElement().isEmpty() == false) { IdType id = new IdType(next.getResponse().getLocation()); String resourceType = id.getResourceType(); if (isNotBlank(resourceType)) { IAnyResource res = (IAnyResource) myContext.getResourceDefinition(resourceType).newInstance(); res.setId(id); retVal.add(res); } } } return retVal; }
@Override public void put(IAnyResource theResource, String theObject) { theResource.setUserData(ENTRY_TRANSACTION_METHOD.name(), theObject); }
@Override public Boolean get(IAnyResource theResource) { return (Boolean) theResource.getUserData(IDao.CURRENTLY_REINDEXING.name()); }
if (nextRes.getIdElement().hasIdPart()) { if (containedIds.contains(nextRes.getIdElement().getValue())) { IIdType id = nextRes.getIdElement(); if (id.hasResourceType() == false) { String resName = myContext.getResourceDefinition(nextRes).getName();
@Override public List<IBaseResource> toListOfResources() { ArrayList<IBaseResource> retVal = new ArrayList<IBaseResource>(); for (BundleEntryComponent next : myBundle.getEntry()) { if (next.getResource() != null) { retVal.add(next.getResource()); } else if (next.getResponse().getLocationElement().isEmpty() == false) { IdType id = new IdType(next.getResponse().getLocation()); String resourceType = id.getResourceType(); if (isNotBlank(resourceType)) { IAnyResource res = (IAnyResource) myContext.getResourceDefinition(resourceType).newInstance(); res.setId(id); retVal.add(res); } } } return retVal; }
@Override public void put(IAnyResource theResource, Boolean theObject) { theResource.setUserData(IDao.CURRENTLY_REINDEXING.name(), theObject); }
@Override public Long get(IAnyResource theResource) { return (Long) theResource.getUserData(IDao.RESOURCE_PID.name()); }