Interface EntityArgService<T extends ubic.gemma.model.common.Identifiable,S extends ubic.gemma.persistence.service.FilteringService<T>>

All Known Implementing Classes:
AbstractEntityArgService, CompositeSequenceArgService, DatabaseEntryArgService, DatasetArgService, ExpressionAnalysisResultSetArgService, GeneArgService, PlatformArgService, QuantitationTypeArgService, TaxonArgService

public interface EntityArgService<T extends ubic.gemma.model.common.Identifiable,S extends ubic.gemma.persistence.service.FilteringService<T>>
Bridges Arg operating on entities with their corresponding FilteringService.
  • Method Details

    • getElementClass

      Class<? extends T> getElementClass()
      See Also:
      • BaseReadOnlyService.getElementClass()
    • getFilterableProperties

      Set<String> getFilterableProperties()
      See Also:
      • FilteringService.getFilterableProperties()
    • getFilterablePropertyType

      Class<?> getFilterablePropertyType(String p)
      See Also:
      • FilteringService.getFilterablePropertyType(String)
    • getFilterablePropertyDescription

      String getFilterablePropertyDescription(String p)
      See Also:
      • FilteringService.getFilterablePropertyDescription(String)
    • getFilterablePropertyAllowedValues

      List<Object> getFilterablePropertyAllowedValues(String p)
      See Also:
      • FilteringService.getFilterablePropertyAllowedValues(String)
    • isFilterablePropertyUsingSubquery

      boolean isFilterablePropertyUsingSubquery(String p)
      See Also:
      • FilteringService.isFilterablePropertyUsingSubquery(String)
    • isFilterablePropertyDeprecated

      boolean isFilterablePropertyDeprecated(String p)
      See Also:
      • FilteringService.isFilterablePropertyDeprecated(String)
    • getFilterablePropertyConfigAttributes

      Collection<org.springframework.security.access.ConfigAttribute> getFilterablePropertyConfigAttributes(String roles)
      See Also:
      • FilteringService.getFilterablePropertyConfigAttributes(String)
    • getFilterablePropertyResolvableAllowedValuesLabels

      List<org.springframework.context.MessageSourceResolvable> getFilterablePropertyResolvableAllowedValuesLabels(String p) throws javax.ws.rs.BadRequestException
      Throws:
      javax.ws.rs.BadRequestException
      See Also:
      • FilteringService.getFilterablePropertyResolvableAllowedValuesLabels(String)
    • getEntity

      @Nonnull T getEntity(AbstractEntityArg<?,T,S> entityArg) throws javax.ws.rs.NotFoundException, javax.ws.rs.BadRequestException
      Retrieve the entity represented by this argument.
      Throws:
      javax.ws.rs.NotFoundException - if the entity does not exist
      javax.ws.rs.BadRequestException - if the argument is malformed
    • getEntities

      List<T> getEntities(AbstractEntityArg<?,T,S> entityArg) throws javax.ws.rs.NotFoundException, javax.ws.rs.BadRequestException
      Retrieve the entities represented by this argument.

      Note that this will never return an empty array.

      This is intended for cases where an argument could match more than one entity.

      Throws:
      javax.ws.rs.NotFoundException - if no entity matching the argument exist
      javax.ws.rs.BadRequestException - if the argument is malformed
    • getEntities

      List<T> getEntities(AbstractEntityArrayArg<T,S> entitiesArg) throws javax.ws.rs.NotFoundException, javax.ws.rs.BadRequestException
      Retrieve each entity represented by the array argument, raising a NotFoundException if any of them is missing.
      Throws:
      javax.ws.rs.NotFoundException - if any entity is missing
      javax.ws.rs.BadRequestException - if the argument is malformed
    • getFilters

      <A> ubic.gemma.persistence.util.Filters getFilters(AbstractEntityArg<A,T,S> entityArg) throws javax.ws.rs.BadRequestException
      Translate the provided entity argument into a Filters.

      This will generate clause in the form of property = value.

      Throws:
      javax.ws.rs.BadRequestException - if the argument is malformed
    • getFilters

      ubic.gemma.persistence.util.Filters getFilters(AbstractEntityArrayArg<T,S> entitiesArg) throws javax.ws.rs.BadRequestException
      Translate the provided entity argument into a Filters.

      This will generate clause in the form of property in (values...).

      Throws:
      javax.ws.rs.BadRequestException - if the argument is malformed
    • getFilters

      ubic.gemma.persistence.util.Filters getFilters(FilterArg<T> filterArg) throws javax.ws.rs.BadRequestException
      Obtain a Filters from a filter argument.
      Throws:
      javax.ws.rs.BadRequestException - if the argument is malformed
    • getSort

      ubic.gemma.persistence.util.Sort getSort(SortArg<T> sortArg) throws javax.ws.rs.BadRequestException
      Obtain a Sort from a sort argument.
      Throws:
      javax.ws.rs.BadRequestException - if the argument is malformed