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="LayoutSetUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class LayoutSetUtil {
29      public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
30          return getPersistence().create(layoutSetId);
31      }
32  
33      public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
34          throws com.liferay.portal.NoSuchLayoutSetException,
35              com.liferay.portal.SystemException {
36          return getPersistence().remove(layoutSetId);
37      }
38  
39      public static com.liferay.portal.model.LayoutSet remove(
40          com.liferay.portal.model.LayoutSet layoutSet)
41          throws com.liferay.portal.SystemException {
42          return getPersistence().remove(layoutSet);
43      }
44  
45      /**
46       * @deprecated Use <code>update(LayoutSet layoutSet, boolean merge)</code>.
47       */
48      public static com.liferay.portal.model.LayoutSet update(
49          com.liferay.portal.model.LayoutSet layoutSet)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(layoutSet);
52      }
53  
54      /**
55       * Add, update, or merge, the entity. This method also calls the model
56       * listeners to trigger the proper events associated with adding, deleting,
57       * or updating an entity.
58       *
59       * @param        layoutSet the entity to add, update, or merge
60       * @param        merge boolean value for whether to merge the entity. The
61       *                default value is false. Setting merge to true is more
62       *                expensive and should only be true when layoutSet is
63       *                transient. See LEP-5473 for a detailed discussion of this
64       *                method.
65       * @return        true if the portlet can be displayed via Ajax
66       */
67      public static com.liferay.portal.model.LayoutSet update(
68          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(layoutSet, merge);
71      }
72  
73      public static com.liferay.portal.model.LayoutSet updateImpl(
74          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
75          throws com.liferay.portal.SystemException {
76          return getPersistence().updateImpl(layoutSet, merge);
77      }
78  
79      public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
80          long layoutSetId)
81          throws com.liferay.portal.NoSuchLayoutSetException,
82              com.liferay.portal.SystemException {
83          return getPersistence().findByPrimaryKey(layoutSetId);
84      }
85  
86      public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
87          long layoutSetId) throws com.liferay.portal.SystemException {
88          return getPersistence().fetchByPrimaryKey(layoutSetId);
89      }
90  
91      public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
92          long groupId) throws com.liferay.portal.SystemException {
93          return getPersistence().findByGroupId(groupId);
94      }
95  
96      public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
97          long groupId, int start, int end)
98          throws com.liferay.portal.SystemException {
99          return getPersistence().findByGroupId(groupId, start, end);
100     }
101 
102     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
103         long groupId, int start, int end,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException {
106         return getPersistence().findByGroupId(groupId, start, end, obc);
107     }
108 
109     public static com.liferay.portal.model.LayoutSet findByGroupId_First(
110         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.NoSuchLayoutSetException,
112             com.liferay.portal.SystemException {
113         return getPersistence().findByGroupId_First(groupId, obc);
114     }
115 
116     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
117         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.NoSuchLayoutSetException,
119             com.liferay.portal.SystemException {
120         return getPersistence().findByGroupId_Last(groupId, obc);
121     }
122 
123     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
124         long layoutSetId, long groupId,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.NoSuchLayoutSetException,
127             com.liferay.portal.SystemException {
128         return getPersistence()
129                    .findByGroupId_PrevAndNext(layoutSetId, groupId, obc);
130     }
131 
132     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
133         java.lang.String virtualHost)
134         throws com.liferay.portal.NoSuchLayoutSetException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByVirtualHost(virtualHost);
137     }
138 
139     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
140         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
141         return getPersistence().fetchByVirtualHost(virtualHost);
142     }
143 
144     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
145         boolean privateLayout)
146         throws com.liferay.portal.NoSuchLayoutSetException,
147             com.liferay.portal.SystemException {
148         return getPersistence().findByG_P(groupId, privateLayout);
149     }
150 
151     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
152         boolean privateLayout) throws com.liferay.portal.SystemException {
153         return getPersistence().fetchByG_P(groupId, privateLayout);
154     }
155 
156     public static java.util.List<Object> findWithDynamicQuery(
157         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findWithDynamicQuery(dynamicQuery);
160     }
161 
162     public static java.util.List<Object> findWithDynamicQuery(
163         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
164         int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
169         throws com.liferay.portal.SystemException {
170         return getPersistence().findAll();
171     }
172 
173     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
174         int start, int end) throws com.liferay.portal.SystemException {
175         return getPersistence().findAll(start, end);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
179         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findAll(start, end, obc);
182     }
183 
184     public static void removeByGroupId(long groupId)
185         throws com.liferay.portal.SystemException {
186         getPersistence().removeByGroupId(groupId);
187     }
188 
189     public static void removeByVirtualHost(java.lang.String virtualHost)
190         throws com.liferay.portal.NoSuchLayoutSetException,
191             com.liferay.portal.SystemException {
192         getPersistence().removeByVirtualHost(virtualHost);
193     }
194 
195     public static void removeByG_P(long groupId, boolean privateLayout)
196         throws com.liferay.portal.NoSuchLayoutSetException,
197             com.liferay.portal.SystemException {
198         getPersistence().removeByG_P(groupId, privateLayout);
199     }
200 
201     public static void removeAll() throws com.liferay.portal.SystemException {
202         getPersistence().removeAll();
203     }
204 
205     public static int countByGroupId(long groupId)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().countByGroupId(groupId);
208     }
209 
210     public static int countByVirtualHost(java.lang.String virtualHost)
211         throws com.liferay.portal.SystemException {
212         return getPersistence().countByVirtualHost(virtualHost);
213     }
214 
215     public static int countByG_P(long groupId, boolean privateLayout)
216         throws com.liferay.portal.SystemException {
217         return getPersistence().countByG_P(groupId, privateLayout);
218     }
219 
220     public static int countAll() throws com.liferay.portal.SystemException {
221         return getPersistence().countAll();
222     }
223 
224     public static LayoutSetPersistence getPersistence() {
225         return _persistence;
226     }
227 
228     public void setPersistence(LayoutSetPersistence persistence) {
229         _persistence = persistence;
230     }
231 
232     private static LayoutSetPersistence _persistence;
233 }