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.portal.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  import com.liferay.portal.model.PluginSetting;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="PluginSettingUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       PluginSettingPersistence
35   * @see       PluginSettingPersistenceImpl
36   * @generated
37   */
38  public class PluginSettingUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(PluginSetting)
48       */
49      public static void clearCache(PluginSetting pluginSetting) {
50          getPersistence().clearCache(pluginSetting);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static PluginSetting remove(PluginSetting pluginSetting)
81          throws SystemException {
82          return getPersistence().remove(pluginSetting);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static PluginSetting update(PluginSetting pluginSetting,
89          boolean merge) throws SystemException {
90          return getPersistence().update(pluginSetting, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.PluginSetting pluginSetting) {
95          getPersistence().cacheResult(pluginSetting);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.PluginSetting> pluginSettings) {
100         getPersistence().cacheResult(pluginSettings);
101     }
102 
103     public static com.liferay.portal.model.PluginSetting create(
104         long pluginSettingId) {
105         return getPersistence().create(pluginSettingId);
106     }
107 
108     public static com.liferay.portal.model.PluginSetting remove(
109         long pluginSettingId)
110         throws com.liferay.portal.NoSuchPluginSettingException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(pluginSettingId);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.PluginSetting update(
119         com.liferay.portal.model.PluginSetting pluginSetting)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(pluginSetting);
122     }
123 
124     public static com.liferay.portal.model.PluginSetting updateImpl(
125         com.liferay.portal.model.PluginSetting pluginSetting, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(pluginSetting, merge);
128     }
129 
130     public static com.liferay.portal.model.PluginSetting findByPrimaryKey(
131         long pluginSettingId)
132         throws com.liferay.portal.NoSuchPluginSettingException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(pluginSettingId);
135     }
136 
137     public static com.liferay.portal.model.PluginSetting fetchByPrimaryKey(
138         long pluginSettingId) throws com.liferay.portal.SystemException {
139         return getPersistence().fetchByPrimaryKey(pluginSettingId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
143         long companyId) throws com.liferay.portal.SystemException {
144         return getPersistence().findByCompanyId(companyId);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
148         long companyId, int start, int end)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByCompanyId(companyId, start, end);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
154         long companyId, int start, int end,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.SystemException {
157         return getPersistence()
158                    .findByCompanyId(companyId, start, end, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.PluginSetting findByCompanyId_First(
162         long companyId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchPluginSettingException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByCompanyId_First(companyId, orderByComparator);
168     }
169 
170     public static com.liferay.portal.model.PluginSetting findByCompanyId_Last(
171         long companyId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.NoSuchPluginSettingException,
174             com.liferay.portal.SystemException {
175         return getPersistence()
176                    .findByCompanyId_Last(companyId, orderByComparator);
177     }
178 
179     public static com.liferay.portal.model.PluginSetting[] findByCompanyId_PrevAndNext(
180         long pluginSettingId, long companyId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.NoSuchPluginSettingException,
183             com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByCompanyId_PrevAndNext(pluginSettingId, companyId,
186             orderByComparator);
187     }
188 
189     public static com.liferay.portal.model.PluginSetting findByC_I_T(
190         long companyId, java.lang.String pluginId, java.lang.String pluginType)
191         throws com.liferay.portal.NoSuchPluginSettingException,
192             com.liferay.portal.SystemException {
193         return getPersistence().findByC_I_T(companyId, pluginId, pluginType);
194     }
195 
196     public static com.liferay.portal.model.PluginSetting fetchByC_I_T(
197         long companyId, java.lang.String pluginId, java.lang.String pluginType)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().fetchByC_I_T(companyId, pluginId, pluginType);
200     }
201 
202     public static com.liferay.portal.model.PluginSetting fetchByC_I_T(
203         long companyId, java.lang.String pluginId, java.lang.String pluginType,
204         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
205         return getPersistence()
206                    .fetchByC_I_T(companyId, pluginId, pluginType,
207             retrieveFromCache);
208     }
209 
210     public static java.util.List<com.liferay.portal.model.PluginSetting> findAll()
211         throws com.liferay.portal.SystemException {
212         return getPersistence().findAll();
213     }
214 
215     public static java.util.List<com.liferay.portal.model.PluginSetting> findAll(
216         int start, int end) throws com.liferay.portal.SystemException {
217         return getPersistence().findAll(start, end);
218     }
219 
220     public static java.util.List<com.liferay.portal.model.PluginSetting> findAll(
221         int start, int end,
222         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().findAll(start, end, orderByComparator);
225     }
226 
227     public static void removeByCompanyId(long companyId)
228         throws com.liferay.portal.SystemException {
229         getPersistence().removeByCompanyId(companyId);
230     }
231 
232     public static void removeByC_I_T(long companyId, java.lang.String pluginId,
233         java.lang.String pluginType)
234         throws com.liferay.portal.NoSuchPluginSettingException,
235             com.liferay.portal.SystemException {
236         getPersistence().removeByC_I_T(companyId, pluginId, pluginType);
237     }
238 
239     public static void removeAll() throws com.liferay.portal.SystemException {
240         getPersistence().removeAll();
241     }
242 
243     public static int countByCompanyId(long companyId)
244         throws com.liferay.portal.SystemException {
245         return getPersistence().countByCompanyId(companyId);
246     }
247 
248     public static int countByC_I_T(long companyId, java.lang.String pluginId,
249         java.lang.String pluginType) throws com.liferay.portal.SystemException {
250         return getPersistence().countByC_I_T(companyId, pluginId, pluginType);
251     }
252 
253     public static int countAll() throws com.liferay.portal.SystemException {
254         return getPersistence().countAll();
255     }
256 
257     public static PluginSettingPersistence getPersistence() {
258         if (_persistence == null) {
259             _persistence = (PluginSettingPersistence)PortalBeanLocatorUtil.locate(PluginSettingPersistence.class.getName());
260 
261             ReferenceRegistry.registerReference(PluginSettingUtil.class,
262                 "_persistence");
263         }
264 
265         return _persistence;
266     }
267 
268     public void setPersistence(PluginSettingPersistence persistence) {
269         _persistence = persistence;
270 
271         ReferenceRegistry.registerReference(PluginSettingUtil.class,
272             "_persistence");
273     }
274 
275     private static PluginSettingPersistence _persistence;
276 }