1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service.persistence;
21  
22  /**
23   * <a href="PluginSettingUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class PluginSettingUtil {
29      public static void cacheResult(
30          com.liferay.portal.model.PluginSetting pluginSetting) {
31          getPersistence().cacheResult(pluginSetting);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portal.model.PluginSetting> pluginSettings) {
36          getPersistence().cacheResult(pluginSettings);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portal.model.PluginSetting create(
44          long pluginSettingId) {
45          return getPersistence().create(pluginSettingId);
46      }
47  
48      public static com.liferay.portal.model.PluginSetting remove(
49          long pluginSettingId)
50          throws com.liferay.portal.NoSuchPluginSettingException,
51              com.liferay.portal.SystemException {
52          return getPersistence().remove(pluginSettingId);
53      }
54  
55      public static com.liferay.portal.model.PluginSetting remove(
56          com.liferay.portal.model.PluginSetting pluginSetting)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(pluginSetting);
59      }
60  
61      /**
62       * @deprecated Use <code>update(PluginSetting pluginSetting, boolean merge)</code>.
63       */
64      public static com.liferay.portal.model.PluginSetting update(
65          com.liferay.portal.model.PluginSetting pluginSetting)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(pluginSetting);
68      }
69  
70      /**
71       * Add, update, or merge, the entity. This method also calls the model
72       * listeners to trigger the proper events associated with adding, deleting,
73       * or updating an entity.
74       *
75       * @param        pluginSetting the entity to add, update, or merge
76       * @param        merge boolean value for whether to merge the entity. The
77       *                default value is false. Setting merge to true is more
78       *                expensive and should only be true when pluginSetting is
79       *                transient. See LEP-5473 for a detailed discussion of this
80       *                method.
81       * @return        true if the portlet can be displayed via Ajax
82       */
83      public static com.liferay.portal.model.PluginSetting update(
84          com.liferay.portal.model.PluginSetting pluginSetting, boolean merge)
85          throws com.liferay.portal.SystemException {
86          return getPersistence().update(pluginSetting, merge);
87      }
88  
89      public static com.liferay.portal.model.PluginSetting updateImpl(
90          com.liferay.portal.model.PluginSetting pluginSetting, boolean merge)
91          throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(pluginSetting, merge);
93      }
94  
95      public static com.liferay.portal.model.PluginSetting findByPrimaryKey(
96          long pluginSettingId)
97          throws com.liferay.portal.NoSuchPluginSettingException,
98              com.liferay.portal.SystemException {
99          return getPersistence().findByPrimaryKey(pluginSettingId);
100     }
101 
102     public static com.liferay.portal.model.PluginSetting fetchByPrimaryKey(
103         long pluginSettingId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(pluginSettingId);
105     }
106 
107     public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
108         long companyId) throws com.liferay.portal.SystemException {
109         return getPersistence().findByCompanyId(companyId);
110     }
111 
112     public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
113         long companyId, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByCompanyId(companyId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
119         long companyId, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByCompanyId(companyId, start, end, obc);
123     }
124 
125     public static com.liferay.portal.model.PluginSetting findByCompanyId_First(
126         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.NoSuchPluginSettingException,
128             com.liferay.portal.SystemException {
129         return getPersistence().findByCompanyId_First(companyId, obc);
130     }
131 
132     public static com.liferay.portal.model.PluginSetting findByCompanyId_Last(
133         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchPluginSettingException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByCompanyId_Last(companyId, obc);
137     }
138 
139     public static com.liferay.portal.model.PluginSetting[] findByCompanyId_PrevAndNext(
140         long pluginSettingId, long companyId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchPluginSettingException,
143             com.liferay.portal.SystemException {
144         return getPersistence()
145                    .findByCompanyId_PrevAndNext(pluginSettingId, companyId, obc);
146     }
147 
148     public static com.liferay.portal.model.PluginSetting findByC_I_T(
149         long companyId, java.lang.String pluginId, java.lang.String pluginType)
150         throws com.liferay.portal.NoSuchPluginSettingException,
151             com.liferay.portal.SystemException {
152         return getPersistence().findByC_I_T(companyId, pluginId, pluginType);
153     }
154 
155     public static com.liferay.portal.model.PluginSetting fetchByC_I_T(
156         long companyId, java.lang.String pluginId, java.lang.String pluginType)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().fetchByC_I_T(companyId, pluginId, pluginType);
159     }
160 
161     public static com.liferay.portal.model.PluginSetting fetchByC_I_T(
162         long companyId, java.lang.String pluginId, java.lang.String pluginType,
163         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
164         return getPersistence()
165                    .fetchByC_I_T(companyId, pluginId, pluginType,
166             retrieveFromCache);
167     }
168 
169     public static java.util.List<Object> findWithDynamicQuery(
170         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
171         throws com.liferay.portal.SystemException {
172         return getPersistence().findWithDynamicQuery(dynamicQuery);
173     }
174 
175     public static java.util.List<Object> findWithDynamicQuery(
176         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
177         int end) throws com.liferay.portal.SystemException {
178         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
179     }
180 
181     public static java.util.List<com.liferay.portal.model.PluginSetting> findAll()
182         throws com.liferay.portal.SystemException {
183         return getPersistence().findAll();
184     }
185 
186     public static java.util.List<com.liferay.portal.model.PluginSetting> findAll(
187         int start, int end) throws com.liferay.portal.SystemException {
188         return getPersistence().findAll(start, end);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.PluginSetting> findAll(
192         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findAll(start, end, obc);
195     }
196 
197     public static void removeByCompanyId(long companyId)
198         throws com.liferay.portal.SystemException {
199         getPersistence().removeByCompanyId(companyId);
200     }
201 
202     public static void removeByC_I_T(long companyId, java.lang.String pluginId,
203         java.lang.String pluginType)
204         throws com.liferay.portal.NoSuchPluginSettingException,
205             com.liferay.portal.SystemException {
206         getPersistence().removeByC_I_T(companyId, pluginId, pluginType);
207     }
208 
209     public static void removeAll() throws com.liferay.portal.SystemException {
210         getPersistence().removeAll();
211     }
212 
213     public static int countByCompanyId(long companyId)
214         throws com.liferay.portal.SystemException {
215         return getPersistence().countByCompanyId(companyId);
216     }
217 
218     public static int countByC_I_T(long companyId, java.lang.String pluginId,
219         java.lang.String pluginType) throws com.liferay.portal.SystemException {
220         return getPersistence().countByC_I_T(companyId, pluginId, pluginType);
221     }
222 
223     public static int countAll() throws com.liferay.portal.SystemException {
224         return getPersistence().countAll();
225     }
226 
227     public static PluginSettingPersistence getPersistence() {
228         return _persistence;
229     }
230 
231     public void setPersistence(PluginSettingPersistence persistence) {
232         _persistence = persistence;
233     }
234 
235     private static PluginSettingPersistence _persistence;
236 }