Package com.patreonshout.jpa
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 voiddeleteListByListId(int list_id)Deletes aListBeanobject via specific list_idListBeanfindListBeanByWebAccountIdAndTitle(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 ofListBeanobjects by its webaccount_idListBeangetListByListId(int list_id)Returns aListBeanobject via specific list_idMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
getListByListId
Returns aListBeanobject via specific list_id- Parameters:
list_id- the id of the list- Returns:
- the
ListBeanholding the list data corresponding to the list_id provided
-
deleteListByListId
void deleteListByListId(int list_id)Deletes aListBeanobject via specific list_id- Parameters:
list_id- is the id of the list we want to delete
-
findListBeanByWebAccountIdAndTitle
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 accounttitle- is the title of the list we want to find- Returns:
- the list with the corresponding account and title
-
findListBeansByWebAccountId
Gets a list ofListBeanobjects by its webaccount_id- Parameters:
webAccountId- the webaccount id we want to get the lists of- Returns:
- a list of
ListBeanobjects
-