Interface EntityArgService<T extends Identifiable,​S extends FilteringService<T>>

    • Method Detail

      • getFilterablePropertyIsUsingSubquery

        boolean getFilterablePropertyIsUsingSubquery​(String p)
      • 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> 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

        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

        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

        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