001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service.persistence;
022:
023: /**
024: * <a href="ShoppingCategoryUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ShoppingCategoryUtil {
030: public static com.liferay.portlet.shopping.model.ShoppingCategory create(
031: long categoryId) {
032: return getPersistence().create(categoryId);
033: }
034:
035: public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
036: long categoryId) throws com.liferay.portal.SystemException,
037: com.liferay.portlet.shopping.NoSuchCategoryException {
038: return getPersistence().remove(categoryId);
039: }
040:
041: public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
042: com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(shoppingCategory);
045: }
046:
047: public static com.liferay.portlet.shopping.model.ShoppingCategory update(
048: com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(shoppingCategory);
051: }
052:
053: public static com.liferay.portlet.shopping.model.ShoppingCategory update(
054: com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(shoppingCategory, merge);
057: }
058:
059: public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
060: com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(shoppingCategory, merge);
063: }
064:
065: public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
066: long categoryId) throws com.liferay.portal.SystemException,
067: com.liferay.portlet.shopping.NoSuchCategoryException {
068: return getPersistence().findByPrimaryKey(categoryId);
069: }
070:
071: public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
072: long categoryId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(categoryId);
074: }
075:
076: public static java.util.List findByGroupId(long groupId)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByGroupId(groupId);
079: }
080:
081: public static java.util.List findByGroupId(long groupId, int begin,
082: int end) throws com.liferay.portal.SystemException {
083: return getPersistence().findByGroupId(groupId, begin, end);
084: }
085:
086: public static java.util.List findByGroupId(long groupId, int begin,
087: int end,
088: com.liferay.portal.kernel.util.OrderByComparator obc)
089: throws com.liferay.portal.SystemException {
090: return getPersistence().findByGroupId(groupId, begin, end, obc);
091: }
092:
093: public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
094: long groupId,
095: com.liferay.portal.kernel.util.OrderByComparator obc)
096: throws com.liferay.portal.SystemException,
097: com.liferay.portlet.shopping.NoSuchCategoryException {
098: return getPersistence().findByGroupId_First(groupId, obc);
099: }
100:
101: public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
102: long groupId,
103: com.liferay.portal.kernel.util.OrderByComparator obc)
104: throws com.liferay.portal.SystemException,
105: com.liferay.portlet.shopping.NoSuchCategoryException {
106: return getPersistence().findByGroupId_Last(groupId, obc);
107: }
108:
109: public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
110: long categoryId, long groupId,
111: com.liferay.portal.kernel.util.OrderByComparator obc)
112: throws com.liferay.portal.SystemException,
113: com.liferay.portlet.shopping.NoSuchCategoryException {
114: return getPersistence().findByGroupId_PrevAndNext(categoryId,
115: groupId, obc);
116: }
117:
118: public static java.util.List findByG_P(long groupId,
119: long parentCategoryId)
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findByG_P(groupId, parentCategoryId);
122: }
123:
124: public static java.util.List findByG_P(long groupId,
125: long parentCategoryId, int begin, int end)
126: throws com.liferay.portal.SystemException {
127: return getPersistence().findByG_P(groupId, parentCategoryId,
128: begin, end);
129: }
130:
131: public static java.util.List findByG_P(long groupId,
132: long parentCategoryId, int begin, int end,
133: com.liferay.portal.kernel.util.OrderByComparator obc)
134: throws com.liferay.portal.SystemException {
135: return getPersistence().findByG_P(groupId, parentCategoryId,
136: begin, end, obc);
137: }
138:
139: public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
140: long groupId, long parentCategoryId,
141: com.liferay.portal.kernel.util.OrderByComparator obc)
142: throws com.liferay.portal.SystemException,
143: com.liferay.portlet.shopping.NoSuchCategoryException {
144: return getPersistence().findByG_P_First(groupId,
145: parentCategoryId, obc);
146: }
147:
148: public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
149: long groupId, long parentCategoryId,
150: com.liferay.portal.kernel.util.OrderByComparator obc)
151: throws com.liferay.portal.SystemException,
152: com.liferay.portlet.shopping.NoSuchCategoryException {
153: return getPersistence().findByG_P_Last(groupId,
154: parentCategoryId, obc);
155: }
156:
157: public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
158: long categoryId, long groupId, long parentCategoryId,
159: com.liferay.portal.kernel.util.OrderByComparator obc)
160: throws com.liferay.portal.SystemException,
161: com.liferay.portlet.shopping.NoSuchCategoryException {
162: return getPersistence().findByG_P_PrevAndNext(categoryId,
163: groupId, parentCategoryId, obc);
164: }
165:
166: public static java.util.List findWithDynamicQuery(
167: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
168: throws com.liferay.portal.SystemException {
169: return getPersistence().findWithDynamicQuery(queryInitializer);
170: }
171:
172: public static java.util.List findWithDynamicQuery(
173: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
174: int begin, int end)
175: throws com.liferay.portal.SystemException {
176: return getPersistence().findWithDynamicQuery(queryInitializer,
177: begin, end);
178: }
179:
180: public static java.util.List findAll()
181: throws com.liferay.portal.SystemException {
182: return getPersistence().findAll();
183: }
184:
185: public static java.util.List findAll(int begin, int end)
186: throws com.liferay.portal.SystemException {
187: return getPersistence().findAll(begin, end);
188: }
189:
190: public static java.util.List findAll(int begin, int end,
191: com.liferay.portal.kernel.util.OrderByComparator obc)
192: throws com.liferay.portal.SystemException {
193: return getPersistence().findAll(begin, end, obc);
194: }
195:
196: public static void removeByGroupId(long groupId)
197: throws com.liferay.portal.SystemException {
198: getPersistence().removeByGroupId(groupId);
199: }
200:
201: public static void removeByG_P(long groupId, long parentCategoryId)
202: throws com.liferay.portal.SystemException {
203: getPersistence().removeByG_P(groupId, parentCategoryId);
204: }
205:
206: public static void removeAll()
207: throws com.liferay.portal.SystemException {
208: getPersistence().removeAll();
209: }
210:
211: public static int countByGroupId(long groupId)
212: throws com.liferay.portal.SystemException {
213: return getPersistence().countByGroupId(groupId);
214: }
215:
216: public static int countByG_P(long groupId, long parentCategoryId)
217: throws com.liferay.portal.SystemException {
218: return getPersistence().countByG_P(groupId, parentCategoryId);
219: }
220:
221: public static int countAll()
222: throws com.liferay.portal.SystemException {
223: return getPersistence().countAll();
224: }
225:
226: public static ShoppingCategoryPersistence getPersistence() {
227: return _getUtil()._persistence;
228: }
229:
230: public void setPersistence(ShoppingCategoryPersistence persistence) {
231: _persistence = persistence;
232: }
233:
234: private static ShoppingCategoryUtil _getUtil() {
235: if (_util == null) {
236: _util = (ShoppingCategoryUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
237: .locate(_UTIL);
238: }
239:
240: return _util;
241: }
242:
243: private static final String _UTIL = ShoppingCategoryUtil.class
244: .getName();
245: private static ShoppingCategoryUtil _util;
246: private ShoppingCategoryPersistence _persistence;
247: }
|