/** * Creates a copy of this include with recurse behaviour */ public Include asRecursive() { return new Include(myValue, true); }
/** * Return a new */ public Include toLocked() { Include retVal = new Include(myValue, myRecurse, true); return retVal; }
/** * Creates a copy of this include with non-recurse behaviour */ public Include asNonRecursive() { return new Include(myValue, false); }
private void fetchNext() { while (myNext == null) { if (myCurrentIterator.hasNext()) { myNext = myCurrentIterator.next(); break; } int start = myCurrentOffset; int end = myCurrentOffset + myPageSize; if (end > myCurrentPids.size()) { end = myCurrentPids.size(); } if (end - start <= 0) { myNext = NO_MORE; break; } myCurrentOffset = end; Collection<Long> pidsToScan = myCurrentPids.subList(start, end); Set<Include> includes = Collections.singleton(new Include("*", true)); Set<Long> newPids = loadIncludes(myContext, myEntityManager, pidsToScan, includes, false, myParams.getLastUpdated(), mySearchUuid); myCurrentIterator = newPids.iterator(); } }
private Set<Include> toIncList(boolean theWantReverse) { HashSet<Include> retVal = new HashSet<>(); for (SearchInclude next : getIncludes()) { if (theWantReverse == next.isReverse()) { retVal.add(new Include(next.getInclude(), next.isRecurse())); } } return Collections.unmodifiableSet(retVal); }
b.append(theResourceType); Include retVal = new Include(b.toString(), myRecurse, myImmutable); return retVal;
@Search() public List<DiagnosticReport> getDiagnosticReport( @RequiredParam(name=DiagnosticReport.SP_IDENTIFIER) TokenParam theIdentifier, @IncludeParam(allow= {"DiagnosticReport:subject"}) Set<Include> theIncludes ) { List<DiagnosticReport> retVal = new ArrayList<DiagnosticReport>(); // Assume this method exists and loads the report from the DB DiagnosticReport report = loadSomeDiagnosticReportFromDatabase(theIdentifier); // If the client has asked for the subject to be included: if (theIncludes.contains(new Include("DiagnosticReport:subject"))) { // The resource reference should contain the ID of the patient IIdType subjectId = report.getSubject().getReferenceElement(); // So load the patient ID and return it Patient subject = loadSomePatientFromDatabase(subjectId); report.getSubject().setResource(subject); } retVal.add(report); return retVal; } //END SNIPPET: pathSpec
/** * Creates a copy of this include with recurse behaviour */ public Include asRecursive() { return new Include(myValue, true); }
if (reqIncludes != null) { for (String nextInclude : reqIncludes) { includes.add(new Include(nextInclude));
/** * Creates a copy of this include with non-recurse behaviour */ public Include asNonRecursive() { return new Include(myValue, false); }
/** * Return a new */ public Include toLocked() { Include retVal = new Include(myValue, myRecurse, true); return retVal; }
private void fetchNext() { while (myNext == null) { if (myCurrentIterator.hasNext()) { myNext = myCurrentIterator.next(); break; } int start = myCurrentOffset; int end = myCurrentOffset + myPageSize; if (end > myCurrentPids.size()) { end = myCurrentPids.size(); } if (end - start <= 0) { myNext = NO_MORE; break; } myCurrentOffset = end; Collection<Long> pidsToScan = myCurrentPids.subList(start, end); Set<Include> includes = Collections.singleton(new Include("*", true)); Set<Long> newPids = loadIncludes(myContext, myEntityManager, pidsToScan, includes, false, myParams.getLastUpdated(), mySearchUuid); myCurrentIterator = newPids.iterator(); } }
private Set<Include> toIncList(boolean theWantReverse) { HashSet<Include> retVal = new HashSet<>(); for (SearchInclude next : getIncludes()) { if (theWantReverse == next.isReverse()) { retVal.add(new Include(next.getInclude(), next.isRecurse())); } } return Collections.unmodifiableSet(retVal); }
b.append(theResourceType); Include retVal = new Include(b.toString(), myRecurse, myImmutable); return retVal;
if (reqIncludes != null) { for (String nextInclude : reqIncludes) { includes.add(new Include(nextInclude));