Class PlatformArgService

All Implemented Interfaces:
EntityArgService<ArrayDesign, ArrayDesignService>

@Service public class PlatformArgService extends AbstractEntityArgService<ArrayDesign, ArrayDesignService>
  • Constructor Details

  • Method Details

    • getPlatformsByCursor

      public CursorPage<ArrayDesignValueObject> getPlatformsByCursor(@Nullable Filters filters, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to SecurableFilteringVoEnabledService.loadValueObjects(Filters, Sort, int, int). Always sorts by ascending id (the primary key, indexed and unique) — see CURSOR_PAGINATION_STEP1_PLAN.md step 1c. The user's ?filter= arg still applies; the user's ?sort= arg is intentionally not honoured in cursor mode because the DAO currently restricts cursors to single-component id sorts (recce sec. 3.4 — to be lifted in phase B once the index audit is complete).
    • getExperiments

      public Slice<ExpressionExperimentValueObject> getExperiments(PlatformArg<?> arg, int limit, int offset)
      Retrieves the Datasets of the Platform that this argument represents.
      Returns:
      a collection of Datasets that the platform represented by this argument contains.
    • getElements

      public Slice<CompositeSequenceValueObject> getElements(PlatformArg<?> arg, int limit, int offset)
      Retrieves the design elements of the platform that this argument represents.
      Returns:
      a collection of design element VOs that the platform represented by this argument contains.
    • getElements

      public Slice<CompositeSequenceValueObject> getElements(PlatformArg<?> arg, int limit, int offset, boolean withSequence)
      Variant that opt-in hydrates the probe-sequence projection (sequence + length) via a single batch HQL after the main page is fetched. Default false preserves the legacy default response size — sequences are 25-300bp per probe and would inflate a 22k-element listing by ~1 MB.
    • getElements

      public Slice<CompositeSequenceValueObject> getElements(PlatformArg<?> arg, int limit, int offset, boolean withSequence, boolean withGenes, @Nullable Collection<Long> geneIds)
      Full-projection variant: adds the opt-in gene column (withGenes) and the opt-in gene restriction (geneIds).

      When geneIds is non-null the page is restricted to the elements on this platform that map to one of those genes, resolved through GENE2CS and composed as an extra cs.id in (...) conjunct on top of the platform-scope filter. Composing rather than replacing means the existing offset pagination, sorting and count queries all apply unchanged. A non-null geneIds that matches no element on this platform short-circuits to an empty page — never to an unrestricted one.

    • getElements

      public Slice<CompositeSequenceValueObject> getElements(PlatformArg<?> arg, @Nullable Filters userFilters, @Nullable Collection<Long> geneIds, int limit, int offset, boolean withSequence, boolean withGenes)
      Widest offset-mode variant: user-supplied filter= conjunct on top of everything else.

      The platform scope is composed FIRST and the user filter ANDed onto it, so a user filter can narrow the listing but never widen it past the platform in the path.

    • getElementFilters

      public Filters getElementFilters(PlatformArg<?> arg, CompositeSequenceArrayArg probesArg)
      Filters for the /{platform}/elements/{probes} endpoints: the platform scope AND the {probes} id/name set restriction.

      Both conjuncts matter. CompositeSequenceArrayArg.getPlatformFilter() encodes ONLY the platform scope, so composing it alone — which is what this endpoint did until 2026-08-22 — silently answered /platforms/GPL96/elements/1007_s_at with the first page of GPL96 rather than with the one probe asked for. The id/name clause comes from AbstractEntityArgService.getFilters(AbstractEntityArrayArg), the same builder every other array-arg endpoint uses.

    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to getElements(PlatformArg, int, int): keyset pagination over the design elements of a single platform, always sorted by ascending id (the primary key, indexed and unique) — see CURSOR_PAGINATION_STEP1_PLAN.md step 1e. The path-derived arrayDesign.id = ? constraint is preserved (composed into the Filters before the DAO call) so the cursor-mode result is restricted to the same platform that the offset-mode result would be. The legacy offset-mode Sort was null (DAO default); cursor mode tightens this to an explicit id-asc sort because the cursor DAO currently restricts cursors to single-component id sorts (recce sec. 3.4 — to be lifted in phase B once the index audit is complete).
    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, @Nullable Cursor cursor, int limit, boolean withSequence)
    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, @Nullable Cursor cursor, int limit, boolean withSequence, boolean withGenes, @Nullable Collection<Long> geneIds)
      Cursor-mode variant of getElements(PlatformArg, int, int, boolean, boolean, Collection). The gene restriction is composed as an extra conjunct exactly as in offset mode, so the keyset walk stays on the same id-asc ordering and the cursor tokens remain interchangeable across pages of the same query.
    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, @Nullable Filters userFilters, @Nullable Collection<Long> geneIds, @Nullable Cursor cursor, int limit, boolean withSequence, boolean withGenes)
    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, CompositeSequenceArrayArg probesArg, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to FilteringVoEnabledService.loadValueObjects(Filters, Sort, int, int) scoped to a single platform AND a fixed set of probe identifiers (the /{platform}/elements/{probes} endpoint) — see CURSOR_PAGINATION_STEP1_PLAN.md step 1j. Always sorted by ascending id (the primary key, indexed and unique) because the cursor DAO currently restricts cursors to single-component id sorts (recce sec. 3.4 — to be lifted in phase B once the index audit is complete).

      Filter composition matches the offset variant exactly: Filters.by(probesArg.getPlatformFilter()). CompositeSequenceArrayArg.getPlatformFilter() already encodes both the arrayDesign.id = ? platform-scope and the id IN (...) / name IN (...) probe-set restriction, so we don't need to compose them separately here.

    • getElements

      public Slice<CompositeSequenceValueObject> getElements(PlatformArg<?> arg, CompositeSequenceArrayArg probesArg, int limit, int offset, boolean withSequence)
      Offset-mode variant of getElementsByCursor(PlatformArg, CompositeSequenceArrayArg, Cursor, int, boolean). Mirrors the inline call at the legacy /{platform}/elements/{probes} offset path so withSequence works there too, not just in cursor mode.
    • getElements

      public Slice<CompositeSequenceValueObject> getElements(PlatformArg<?> arg, CompositeSequenceArrayArg probesArg, int limit, int offset, boolean withSequence, boolean withGenes)
      Probe-set variant with the opt-in gene column.
    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, CompositeSequenceArrayArg probesArg, @Nullable Cursor cursor, int limit, boolean withSequence)
      Cursor-mode + probe-set variant of getElements(PlatformArg, int, int, boolean).
    • getElementsByCursor

      public CursorPage<CompositeSequenceValueObject> getElementsByCursor(PlatformArg<?> arg, CompositeSequenceArrayArg probesArg, @Nullable Cursor cursor, int limit, boolean withSequence, boolean withGenes)
      Cursor-mode + probe-set variant with the opt-in gene column.
    • getExperimentsByCursor

      public CursorPage<ExpressionExperimentValueObject> getExperimentsByCursor(PlatformArg<?> arg, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to getExperiments(PlatformArg, int, int): keyset pagination over the datasets that use a single platform, always sorted by ascending id (the primary key, indexed and unique) — see CURSOR_PAGINATION_STEP1_PLAN.md step 1f. The path-derived bioAssays.arrayDesignUsed.id = ? constraint is preserved (composed into the Filters before the DAO call) so the cursor-mode result is restricted to the same platform that the offset-mode result would be. The legacy offset-mode Sort keyed off bioAssays.arrayDesignUsed.id (not stable for keyset pagination); cursor mode tightens this to an explicit id-asc sort because the cursor DAO currently restricts cursors to single-component id sorts (recce sec. 3.4 — to be lifted in phase B once the index audit is complete).
    • getBlacklistedPlatformsByCursor

      public CursorPage<ArrayDesignValueObject> getBlacklistedPlatformsByCursor(@Nullable Filters filters, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to ArrayDesignService.loadBlacklistedValueObjects(Filters, Sort, int, int). Always sorts by ascending id (the primary key, indexed and unique) — see CURSOR_PAGINATION_STEP1_PLAN.md step 1h. The user's ?filter= arg still applies; the user's ?sort= arg is intentionally not honoured in cursor mode because the DAO currently restricts cursors to single-component id sorts (recce sec. 3.4 — to be lifted in phase B once the index audit is complete). The blacklist short-name/accession predicate is composed inside the DAO (ArrayDesignDaoImpl#composeBlacklistFilters) so the same blacklist scope is enforced identically in both modes.