|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.shopping.service.persistence.ShoppingCategoryUtil
public class ShoppingCategoryUtil
The persistence utility for the shopping category service. This utility wraps ShoppingCategoryPersistenceImpl
and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
Caching information and settings can be found in portal.properties
ShoppingCategoryPersistence
,
ShoppingCategoryPersistenceImpl
Constructor Summary | |
---|---|
ShoppingCategoryUtil()
|
Method Summary | |
---|---|
static void |
cacheResult(List<ShoppingCategory> shoppingCategories)
Caches the shopping categories in the entity cache if it is enabled. |
static void |
cacheResult(ShoppingCategory shoppingCategory)
Caches the shopping category in the entity cache if it is enabled. |
static void |
clearCache()
|
static void |
clearCache(ShoppingCategory shoppingCategory)
|
static int |
countAll()
Returns the number of shopping categories. |
static int |
countByG_P(long groupId,
long parentCategoryId)
Returns the number of shopping categories where groupId = ? and parentCategoryId = ?. |
static int |
countByGroupId(long groupId)
Returns the number of shopping categories where groupId = ?. |
long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static ShoppingCategory |
create(long categoryId)
Creates a new shopping category with the primary key. |
static ShoppingCategory |
fetchByG_P_First(long groupId,
long parentCategoryId,
OrderByComparator orderByComparator)
Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?. |
static ShoppingCategory |
fetchByG_P_Last(long groupId,
long parentCategoryId,
OrderByComparator orderByComparator)
Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?. |
static ShoppingCategory |
fetchByGroupId_First(long groupId,
OrderByComparator orderByComparator)
Returns the first shopping category in the ordered set where groupId = ?. |
static ShoppingCategory |
fetchByGroupId_Last(long groupId,
OrderByComparator orderByComparator)
Returns the last shopping category in the ordered set where groupId = ?. |
static ShoppingCategory |
fetchByPrimaryKey(long categoryId)
Returns the shopping category with the primary key or returns null if it could not be found. |
static int |
filterCountByG_P(long groupId,
long parentCategoryId)
Returns the number of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?. |
static int |
filterCountByGroupId(long groupId)
Returns the number of shopping categories that the user has permission to view where groupId = ?. |
static ShoppingCategory[] |
filterFindByG_P_PrevAndNext(long categoryId,
long groupId,
long parentCategoryId,
OrderByComparator orderByComparator)
Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?. |
static List<ShoppingCategory> |
filterFindByG_P(long groupId,
long parentCategoryId)
Returns all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?. |
static List<ShoppingCategory> |
filterFindByG_P(long groupId,
long parentCategoryId,
int start,
int end)
Returns a range of all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?. |
static List<ShoppingCategory> |
filterFindByG_P(long groupId,
long parentCategoryId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ? and parentCategoryId = ?. |
static ShoppingCategory[] |
filterFindByGroupId_PrevAndNext(long categoryId,
long groupId,
OrderByComparator orderByComparator)
Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = ?. |
static List<ShoppingCategory> |
filterFindByGroupId(long groupId)
Returns all the shopping categories that the user has permission to view where groupId = ?. |
static List<ShoppingCategory> |
filterFindByGroupId(long groupId,
int start,
int end)
Returns a range of all the shopping categories that the user has permission to view where groupId = ?. |
static List<ShoppingCategory> |
filterFindByGroupId(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ?. |
static List<ShoppingCategory> |
findAll()
Returns all the shopping categories. |
static List<ShoppingCategory> |
findAll(int start,
int end)
Returns a range of all the shopping categories. |
static List<ShoppingCategory> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the shopping categories. |
static ShoppingCategory |
findByG_P_First(long groupId,
long parentCategoryId,
OrderByComparator orderByComparator)
Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?. |
static ShoppingCategory |
findByG_P_Last(long groupId,
long parentCategoryId,
OrderByComparator orderByComparator)
Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?. |
static ShoppingCategory[] |
findByG_P_PrevAndNext(long categoryId,
long groupId,
long parentCategoryId,
OrderByComparator orderByComparator)
Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ? and parentCategoryId = ?. |
static List<ShoppingCategory> |
findByG_P(long groupId,
long parentCategoryId)
Returns all the shopping categories where groupId = ? and parentCategoryId = ?. |
static List<ShoppingCategory> |
findByG_P(long groupId,
long parentCategoryId,
int start,
int end)
Returns a range of all the shopping categories where groupId = ? and parentCategoryId = ?. |
static List<ShoppingCategory> |
findByG_P(long groupId,
long parentCategoryId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the shopping categories where groupId = ? and parentCategoryId = ?. |
static ShoppingCategory |
findByGroupId_First(long groupId,
OrderByComparator orderByComparator)
Returns the first shopping category in the ordered set where groupId = ?. |
static ShoppingCategory |
findByGroupId_Last(long groupId,
OrderByComparator orderByComparator)
Returns the last shopping category in the ordered set where groupId = ?. |
static ShoppingCategory[] |
findByGroupId_PrevAndNext(long categoryId,
long groupId,
OrderByComparator orderByComparator)
Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ?. |
static List<ShoppingCategory> |
findByGroupId(long groupId)
Returns all the shopping categories where groupId = ?. |
static List<ShoppingCategory> |
findByGroupId(long groupId,
int start,
int end)
Returns a range of all the shopping categories where groupId = ?. |
static List<ShoppingCategory> |
findByGroupId(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the shopping categories where groupId = ?. |
static ShoppingCategory |
findByPrimaryKey(long categoryId)
Returns the shopping category with the primary key or throws a NoSuchCategoryException if it could not be found. |
static List<ShoppingCategory> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<ShoppingCategory> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List<ShoppingCategory> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
|
static ShoppingCategoryPersistence |
getPersistence()
|
static ShoppingCategory |
remove(long categoryId)
Removes the shopping category with the primary key from the database. |
static void |
removeAll()
Removes all the shopping categories from the database. |
static void |
removeByG_P(long groupId,
long parentCategoryId)
Removes all the shopping categories where groupId = ? and parentCategoryId = ? from the database. |
static void |
removeByGroupId(long groupId)
Removes all the shopping categories where groupId = ? from the database. |
void |
setPersistence(ShoppingCategoryPersistence persistence)
Deprecated. |
static ShoppingCategory |
update(ShoppingCategory shoppingCategory,
boolean merge)
|
static ShoppingCategory |
update(ShoppingCategory shoppingCategory,
boolean merge,
ServiceContext serviceContext)
|
static ShoppingCategory |
updateImpl(ShoppingCategory shoppingCategory,
boolean merge)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShoppingCategoryUtil()
Method Detail |
---|
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(ShoppingCategory shoppingCategory)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)
public long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static ShoppingCategory update(ShoppingCategory shoppingCategory, boolean merge) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)
public static ShoppingCategory update(ShoppingCategory shoppingCategory, boolean merge, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
public static void cacheResult(ShoppingCategory shoppingCategory)
shoppingCategory
- the shopping categorypublic static void cacheResult(List<ShoppingCategory> shoppingCategories)
shoppingCategories
- the shopping categoriespublic static ShoppingCategory create(long categoryId)
categoryId
- the primary key for the new shopping category
public static ShoppingCategory remove(long categoryId) throws SystemException, NoSuchCategoryException
categoryId
- the primary key of the shopping category
NoSuchCategoryException
- if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory updateImpl(ShoppingCategory shoppingCategory, boolean merge) throws SystemException
SystemException
public static ShoppingCategory findByPrimaryKey(long categoryId) throws SystemException, NoSuchCategoryException
NoSuchCategoryException
if it could not be found.
categoryId
- the primary key of the shopping category
NoSuchCategoryException
- if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory fetchByPrimaryKey(long categoryId) throws SystemException
null
if it could not be found.
categoryId
- the primary key of the shopping category
null
if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findByGroupId(long groupId, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static ShoppingCategory findByGroupId_First(long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory fetchByGroupId_First(long groupId, OrderByComparator orderByComparator) throws SystemException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory findByGroupId_Last(long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory fetchByGroupId_Last(long groupId, OrderByComparator orderByComparator) throws SystemException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory[] findByGroupId_PrevAndNext(long categoryId, long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
categoryId
- the primary key of the current shopping categorygroupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> filterFindByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> filterFindByGroupId(long groupId, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> filterFindByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static ShoppingCategory[] filterFindByGroupId_PrevAndNext(long categoryId, long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
categoryId
- the primary key of the current shopping categorygroupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category ID
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDparentCategoryId
- the parent category IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDparentCategoryId
- the parent category IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static ShoppingCategory findByG_P_First(long groupId, long parentCategoryId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
groupId
- the group IDparentCategoryId
- the parent category IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory fetchByG_P_First(long groupId, long parentCategoryId, OrderByComparator orderByComparator) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory findByG_P_Last(long groupId, long parentCategoryId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
groupId
- the group IDparentCategoryId
- the parent category IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory fetchByG_P_Last(long groupId, long parentCategoryId, OrderByComparator orderByComparator) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching shopping category could not be found
SystemException
- if a system exception occurredpublic static ShoppingCategory[] findByG_P_PrevAndNext(long categoryId, long groupId, long parentCategoryId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
categoryId
- the primary key of the current shopping categorygroupId
- the group IDparentCategoryId
- the parent category IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category ID
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDparentCategoryId
- the parent category IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
groupId
- the group IDparentCategoryId
- the parent category IDstart
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static ShoppingCategory[] filterFindByG_P_PrevAndNext(long categoryId, long groupId, long parentCategoryId, OrderByComparator orderByComparator) throws SystemException, NoSuchCategoryException
categoryId
- the primary key of the current shopping categorygroupId
- the group IDparentCategoryId
- the parent category IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCategoryException
- if a shopping category with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findAll(int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
start
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCategory> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
start
- the lower bound of the range of shopping categoriesend
- the upper bound of the range of shopping categories (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static void removeByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static void removeByG_P(long groupId, long parentCategoryId) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category ID
SystemException
- if a system exception occurredpublic static void removeAll() throws SystemException
SystemException
- if a system exception occurredpublic static int countByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static int filterCountByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static int countByG_P(long groupId, long parentCategoryId) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category ID
SystemException
- if a system exception occurredpublic static int filterCountByG_P(long groupId, long parentCategoryId) throws SystemException
groupId
- the group IDparentCategoryId
- the parent category ID
SystemException
- if a system exception occurredpublic static int countAll() throws SystemException
SystemException
- if a system exception occurredpublic static ShoppingCategoryPersistence getPersistence()
public void setPersistence(ShoppingCategoryPersistence persistence)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |