1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.expando.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  
22  import com.liferay.portlet.expando.model.ExpandoRow;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="ExpandoRowUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       ExpandoRowPersistence
36   * @see       ExpandoRowPersistenceImpl
37   * @generated
38   */
39  public class ExpandoRowUtil {
40      /**
41       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
42       */
43      public static void clearCache() {
44          getPersistence().clearCache();
45      }
46  
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ExpandoRow)
49       */
50      public static void clearCache(ExpandoRow expandoRow) {
51          getPersistence().clearCache(expandoRow);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
56       */
57      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().countWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66          throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
72       */
73      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74          int start, int end) throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static ExpandoRow remove(ExpandoRow expandoRow)
82          throws SystemException {
83          return getPersistence().remove(expandoRow);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ExpandoRow update(ExpandoRow expandoRow, boolean merge)
90          throws SystemException {
91          return getPersistence().update(expandoRow, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
96          getPersistence().cacheResult(expandoRow);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.expando.model.ExpandoRow> expandoRows) {
101         getPersistence().cacheResult(expandoRows);
102     }
103 
104     public static com.liferay.portlet.expando.model.ExpandoRow create(
105         long rowId) {
106         return getPersistence().create(rowId);
107     }
108 
109     public static com.liferay.portlet.expando.model.ExpandoRow remove(
110         long rowId)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.expando.NoSuchRowException {
113         return getPersistence().remove(rowId);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portlet.expando.model.ExpandoRow update(
120         com.liferay.portlet.expando.model.ExpandoRow expandoRow)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(expandoRow);
123     }
124 
125     public static com.liferay.portlet.expando.model.ExpandoRow updateImpl(
126         com.liferay.portlet.expando.model.ExpandoRow expandoRow, boolean merge)
127         throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(expandoRow, merge);
129     }
130 
131     public static com.liferay.portlet.expando.model.ExpandoRow findByPrimaryKey(
132         long rowId)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.expando.NoSuchRowException {
135         return getPersistence().findByPrimaryKey(rowId);
136     }
137 
138     public static com.liferay.portlet.expando.model.ExpandoRow fetchByPrimaryKey(
139         long rowId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(rowId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
144         long tableId) throws com.liferay.portal.SystemException {
145         return getPersistence().findByTableId(tableId);
146     }
147 
148     public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
149         long tableId, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByTableId(tableId, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
155         long tableId, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByTableId(tableId, start, end, orderByComparator);
160     }
161 
162     public static com.liferay.portlet.expando.model.ExpandoRow findByTableId_First(
163         long tableId,
164         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165         throws com.liferay.portal.SystemException,
166             com.liferay.portlet.expando.NoSuchRowException {
167         return getPersistence().findByTableId_First(tableId, orderByComparator);
168     }
169 
170     public static com.liferay.portlet.expando.model.ExpandoRow findByTableId_Last(
171         long tableId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.expando.NoSuchRowException {
175         return getPersistence().findByTableId_Last(tableId, orderByComparator);
176     }
177 
178     public static com.liferay.portlet.expando.model.ExpandoRow[] findByTableId_PrevAndNext(
179         long rowId, long tableId,
180         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.expando.NoSuchRowException {
183         return getPersistence()
184                    .findByTableId_PrevAndNext(rowId, tableId, orderByComparator);
185     }
186 
187     public static com.liferay.portlet.expando.model.ExpandoRow findByT_C(
188         long tableId, long classPK)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.expando.NoSuchRowException {
191         return getPersistence().findByT_C(tableId, classPK);
192     }
193 
194     public static com.liferay.portlet.expando.model.ExpandoRow fetchByT_C(
195         long tableId, long classPK) throws com.liferay.portal.SystemException {
196         return getPersistence().fetchByT_C(tableId, classPK);
197     }
198 
199     public static com.liferay.portlet.expando.model.ExpandoRow fetchByT_C(
200         long tableId, long classPK, boolean retrieveFromCache)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().fetchByT_C(tableId, classPK, retrieveFromCache);
203     }
204 
205     public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll()
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findAll();
208     }
209 
210     public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll(
211         int start, int end) throws com.liferay.portal.SystemException {
212         return getPersistence().findAll(start, end);
213     }
214 
215     public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll(
216         int start, int end,
217         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(start, end, orderByComparator);
220     }
221 
222     public static void removeByTableId(long tableId)
223         throws com.liferay.portal.SystemException {
224         getPersistence().removeByTableId(tableId);
225     }
226 
227     public static void removeByT_C(long tableId, long classPK)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.expando.NoSuchRowException {
230         getPersistence().removeByT_C(tableId, classPK);
231     }
232 
233     public static void removeAll() throws com.liferay.portal.SystemException {
234         getPersistence().removeAll();
235     }
236 
237     public static int countByTableId(long tableId)
238         throws com.liferay.portal.SystemException {
239         return getPersistence().countByTableId(tableId);
240     }
241 
242     public static int countByT_C(long tableId, long classPK)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().countByT_C(tableId, classPK);
245     }
246 
247     public static int countAll() throws com.liferay.portal.SystemException {
248         return getPersistence().countAll();
249     }
250 
251     public static ExpandoRowPersistence getPersistence() {
252         if (_persistence == null) {
253             _persistence = (ExpandoRowPersistence)PortalBeanLocatorUtil.locate(ExpandoRowPersistence.class.getName());
254 
255             ReferenceRegistry.registerReference(ExpandoRowUtil.class,
256                 "_persistence");
257         }
258 
259         return _persistence;
260     }
261 
262     public void setPersistence(ExpandoRowPersistence persistence) {
263         _persistence = persistence;
264 
265         ReferenceRegistry.registerReference(ExpandoRowUtil.class, "_persistence");
266     }
267 
268     private static ExpandoRowPersistence _persistence;
269 }