@Component(value="tabService") public class TabServiceHibernateImpl extends nl.surfnet.coin.shared.service.GenericServiceHibernateImpl<Tab> implements TabService
| Constructor and Description |
|---|
TabServiceHibernateImpl() |
| Modifier and Type | Method and Description |
|---|---|
ClonedTab |
cloneTab(Tab tab,
List<Gadget> sharedGadgets)
Clone a tab.
|
protected List<Tab> |
findByCriteria(org.hibernate.criterion.Criterion... criterion) |
Tab |
findByIdAndOwner(Long id,
String ownerId)
Finds a tab by Id and owner
|
List<Tab> |
findFavorites(String ownerId,
boolean favorites)
Find favorites.
|
int |
getCountByOwner(String ownerId,
boolean favorites)
Get a count of all tabs.
|
List<Tab> |
getTabsByOwner(String ownerId)
Get all the tabs of a person.
|
boolean |
reorderTabs(String[] newOrder,
String ownerId,
boolean favorites)
Reorder favorite tabs.
|
createCriteria, delete, detachFromSession, findAll, findByCriteriaOrdered, findByExample, findByExample, findById, getCount, getPersistentClass, getSession, saveOrUpdate, saveOrUpdatepublic List<Tab> findFavorites(String ownerId, boolean favorites)
findFavorites in interface TabServiceownerId - the String with the Id of the ownerfavorites - true for all favorites, false for non-favorites.public boolean reorderTabs(String[] newOrder, String ownerId, boolean favorites)
TabServicereorderTabs in interface TabServicenewOrder - the String[] containing the new orderownerId - the String with the Id of the ownertrue if the reordering was succesful false if it wasn'tpublic int getCountByOwner(String ownerId, boolean favorites)
TabServicegetCountByOwner in interface TabServiceownerId - the String with the Id of the ownerfavorites - boolean indicating the favorite nature.int the number of all tabs by the given ownerpublic ClonedTab cloneTab(Tab tab, List<Gadget> sharedGadgets)
TabServicecloneTab in interface TabServicetab - the tab to clone.sharedGadgets - the List containing the GadgetsClonedTabprotected List<Tab> findByCriteria(org.hibernate.criterion.Criterion... criterion)
findByCriteria in class nl.surfnet.coin.shared.service.GenericServiceHibernateImpl<Tab>public List<Tab> getTabsByOwner(String ownerId)
TabServicegetTabsByOwner in interface TabServiceList of all Gadgetspublic Tab findByIdAndOwner(Long id, String ownerId)
findByIdAndOwner in interface TabServiceid - of the TabownerId - the String with the Id of the ownernull if it can't be foundCopyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.