Changeset 7910


Ignore:
Timestamp:
Feb 12, 2021, 10:57:34 AM (10 months ago)
Author:
Nicklas Nordborg
Message:

Fixes #2243: ItemList? API should use parameterized return types in getMembers() and getAllItems() methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/ItemList.java

    r7883 r7910  
    751751    @throws BaseException If the query could not be created and configured.
    752752  */
    753   public ItemQuery<? extends Listable> getMembers()
     753  public <T extends BasicItem & Listable> ItemQuery<T> getMembers()
    754754    throws BaseException
    755755  {
    756     ItemQuery<? extends Listable> query = getAllItems();
     756    ItemQuery<T> query = getAllItems();
    757757    query.restrictPermanent(
    758758      Hql.restriction("$id=ANY(SELECT mmb FROM ItemListData lst INNER JOIN lst.members mmb WHERE lst.id=" + getId()+")", "$")
     
    770770    @see Item#getQuery()
    771771  */
    772   public ItemQuery<? extends Listable> getAllItems()
     772  public <T extends BasicItem & Listable> ItemQuery<T> getAllItems()
    773773    throws BaseException
    774774  {
Note: See TracChangeset for help on using the changeset viewer.