Package com.avoka.fc.core.dao
Class CategoryDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.CategoryDao
-
public class CategoryDao extends AbstractDao
Provides a DAO for theCategory
entity.- Since:
- 3.6.0
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description CategoryDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Category>
getCategoriesForClient(Client client)
Return the list of categories for the given client, ordered ascending by category name.Category
getCategoryByName(Client client, String name)
Return the category with the given name, for the given client.Category
getCategoryForPK(Object categoryId)
Return the category with the specified IDList<String>
getCombinedCategoriesForPortal(Portal portal)
Return the list of categories applicable to the given portals ordered by name (the set of category names belonging to clients associated with the portal) Note that since categories are client-specific, duplicate entries might exist and will be combined in the results.-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
getCategoryForPK
public Category getCategoryForPK(Object categoryId)
Return the category with the specified ID- Parameters:
categoryId
- the OID of the category (required)- Returns:
- the matching category, or null if not found
-
getCategoryByName
public Category getCategoryByName(Client client, String name)
Return the category with the given name, for the given client. There should never be more than 1 match.- Parameters:
client
- the client (required)name
- the name (required)- Returns:
- the matching category, or null if not found
-
getCategoriesForClient
public List<Category> getCategoriesForClient(Client client)
Return the list of categories for the given client, ordered ascending by category name.- Parameters:
client
- the client (required)- Returns:
- the sorted list of categories
-
getCombinedCategoriesForPortal
public List<String> getCombinedCategoriesForPortal(Portal portal)
Return the list of categories applicable to the given portals ordered by name (the set of category names belonging to clients associated with the portal) Note that since categories are client-specific, duplicate entries might exist and will be combined in the results.- Parameters:
portal
- the portal (required)- Returns:
- the list of categories, ordered by name
- Since:
- 3.6.0
-
-