Interface ListsRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ListBean,​java.lang.Integer>, org.springframework.data.jpa.repository.JpaRepository<ListBean,​java.lang.Integer>, org.springframework.data.repository.PagingAndSortingRepository<ListBean,​java.lang.Integer>, org.springframework.data.repository.query.QueryByExampleExecutor<ListBean>, org.springframework.data.repository.Repository<ListBean,​java.lang.Integer>

@Transactional
public interface ListsRepository
extends org.springframework.data.jpa.repository.JpaRepository<ListBean,​java.lang.Integer>
Spring Data Repository for easy use of CRUD operations on the ListBean object
  • Method Summary

    Modifier and Type Method Description
    void deleteListByListId​(int list_id)
    Deletes a ListBean object via specific list_id
    ListBean findListBeanByWebAccountIdAndTitle​(int webAccountId, java.lang.String title)
    Gets a list by the user and the list title.
    java.util.List<ListBean> findListBeansByWebAccountId​(int webAccountId)
    Gets a list of ListBean objects by its webaccount_id
    ListBean getListByListId​(int list_id)
    Returns a ListBean object via specific list_id

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • getListByListId

      ListBean getListByListId​(int list_id)
      Returns a ListBean object via specific list_id
      Parameters:
      list_id - the id of the list
      Returns:
      the ListBean holding the list data corresponding to the list_id provided
    • deleteListByListId

      void deleteListByListId​(int list_id)
      Deletes a ListBean object via specific list_id
      Parameters:
      list_id - is the id of the list we want to delete
    • findListBeanByWebAccountIdAndTitle

      ListBean findListBeanByWebAccountIdAndTitle​(int webAccountId, java.lang.String title)
      Gets a list by the user and the list title. WARNING--should only be used when trying to get a user's "Favorites" list
      Parameters:
      webAccountId - is the id of the user's web account
      title - is the title of the list we want to find
      Returns:
      the list with the corresponding account and title
    • findListBeansByWebAccountId

      java.util.List<ListBean> findListBeansByWebAccountId​(int webAccountId)
      Gets a list of ListBean objects by its webaccount_id
      Parameters:
      webAccountId - the webaccount id we want to get the lists of
      Returns:
      a list of ListBean objects