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.ExpandoTable;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="ExpandoTableUtil.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       ExpandoTablePersistence
36   * @see       ExpandoTablePersistenceImpl
37   * @generated
38   */
39  public class ExpandoTableUtil {
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(ExpandoTable)
49       */
50      public static void clearCache(ExpandoTable expandoTable) {
51          getPersistence().clearCache(expandoTable);
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 ExpandoTable remove(ExpandoTable expandoTable)
82          throws SystemException {
83          return getPersistence().remove(expandoTable);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ExpandoTable update(ExpandoTable expandoTable, boolean merge)
90          throws SystemException {
91          return getPersistence().update(expandoTable, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
96          getPersistence().cacheResult(expandoTable);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.expando.model.ExpandoTable> expandoTables) {
101         getPersistence().cacheResult(expandoTables);
102     }
103 
104     public static com.liferay.portlet.expando.model.ExpandoTable create(
105         long tableId) {
106         return getPersistence().create(tableId);
107     }
108 
109     public static com.liferay.portlet.expando.model.ExpandoTable remove(
110         long tableId)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.expando.NoSuchTableException {
113         return getPersistence().remove(tableId);
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.ExpandoTable update(
120         com.liferay.portlet.expando.model.ExpandoTable expandoTable)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(expandoTable);
123     }
124 
125     public static com.liferay.portlet.expando.model.ExpandoTable updateImpl(
126         com.liferay.portlet.expando.model.ExpandoTable expandoTable,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(expandoTable, merge);
129     }
130 
131     public static com.liferay.portlet.expando.model.ExpandoTable findByPrimaryKey(
132         long tableId)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.expando.NoSuchTableException {
135         return getPersistence().findByPrimaryKey(tableId);
136     }
137 
138     public static com.liferay.portlet.expando.model.ExpandoTable fetchByPrimaryKey(
139         long tableId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(tableId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
144         long companyId, long classNameId)
145         throws com.liferay.portal.SystemException {
146         return getPersistence().findByC_C(companyId, classNameId);
147     }
148 
149     public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
150         long companyId, long classNameId, int start, int end)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByC_C(companyId, classNameId, start, end);
153     }
154 
155     public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
156         long companyId, long classNameId, int start, int end,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.SystemException {
159         return getPersistence()
160                    .findByC_C(companyId, classNameId, start, end,
161             orderByComparator);
162     }
163 
164     public static com.liferay.portlet.expando.model.ExpandoTable findByC_C_First(
165         long companyId, long classNameId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.SystemException,
168             com.liferay.portlet.expando.NoSuchTableException {
169         return getPersistence()
170                    .findByC_C_First(companyId, classNameId, orderByComparator);
171     }
172 
173     public static com.liferay.portlet.expando.model.ExpandoTable findByC_C_Last(
174         long companyId, long classNameId,
175         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.expando.NoSuchTableException {
178         return getPersistence()
179                    .findByC_C_Last(companyId, classNameId, orderByComparator);
180     }
181 
182     public static com.liferay.portlet.expando.model.ExpandoTable[] findByC_C_PrevAndNext(
183         long tableId, long companyId, long classNameId,
184         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185         throws com.liferay.portal.SystemException,
186             com.liferay.portlet.expando.NoSuchTableException {
187         return getPersistence()
188                    .findByC_C_PrevAndNext(tableId, companyId, classNameId,
189             orderByComparator);
190     }
191 
192     public static com.liferay.portlet.expando.model.ExpandoTable findByC_C_N(
193         long companyId, long classNameId, java.lang.String name)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portlet.expando.NoSuchTableException {
196         return getPersistence().findByC_C_N(companyId, classNameId, name);
197     }
198 
199     public static com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N(
200         long companyId, long classNameId, java.lang.String name)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().fetchByC_C_N(companyId, classNameId, name);
203     }
204 
205     public static com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N(
206         long companyId, long classNameId, java.lang.String name,
207         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
208         return getPersistence()
209                    .fetchByC_C_N(companyId, classNameId, name, retrieveFromCache);
210     }
211 
212     public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll()
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findAll();
215     }
216 
217     public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll(
218         int start, int end) throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(start, end);
220     }
221 
222     public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll(
223         int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().findAll(start, end, orderByComparator);
227     }
228 
229     public static void removeByC_C(long companyId, long classNameId)
230         throws com.liferay.portal.SystemException {
231         getPersistence().removeByC_C(companyId, classNameId);
232     }
233 
234     public static void removeByC_C_N(long companyId, long classNameId,
235         java.lang.String name)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.expando.NoSuchTableException {
238         getPersistence().removeByC_C_N(companyId, classNameId, name);
239     }
240 
241     public static void removeAll() throws com.liferay.portal.SystemException {
242         getPersistence().removeAll();
243     }
244 
245     public static int countByC_C(long companyId, long classNameId)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().countByC_C(companyId, classNameId);
248     }
249 
250     public static int countByC_C_N(long companyId, long classNameId,
251         java.lang.String name) throws com.liferay.portal.SystemException {
252         return getPersistence().countByC_C_N(companyId, classNameId, name);
253     }
254 
255     public static int countAll() throws com.liferay.portal.SystemException {
256         return getPersistence().countAll();
257     }
258 
259     public static ExpandoTablePersistence getPersistence() {
260         if (_persistence == null) {
261             _persistence = (ExpandoTablePersistence)PortalBeanLocatorUtil.locate(ExpandoTablePersistence.class.getName());
262 
263             ReferenceRegistry.registerReference(ExpandoTableUtil.class,
264                 "_persistence");
265         }
266 
267         return _persistence;
268     }
269 
270     public void setPersistence(ExpandoTablePersistence persistence) {
271         _persistence = persistence;
272 
273         ReferenceRegistry.registerReference(ExpandoTableUtil.class,
274             "_persistence");
275     }
276 
277     private static ExpandoTablePersistence _persistence;
278 }