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