1   /**
2    * Copyright (c) 2000-2008 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="LayoutSetUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class LayoutSetUtil {
32      public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
33          return getPersistence().create(layoutSetId);
34      }
35  
36      public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchLayoutSetException {
39          return getPersistence().remove(layoutSetId);
40      }
41  
42      public static com.liferay.portal.model.LayoutSet remove(
43          com.liferay.portal.model.LayoutSet layoutSet)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(layoutSet);
46      }
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      public static com.liferay.portal.model.LayoutSet update(
55          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(layoutSet, merge);
58      }
59  
60      public static com.liferay.portal.model.LayoutSet updateImpl(
61          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(layoutSet, merge);
64      }
65  
66      public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
67          long layoutSetId)
68          throws com.liferay.portal.SystemException, 
69              com.liferay.portal.NoSuchLayoutSetException {
70          return getPersistence().findByPrimaryKey(layoutSetId);
71      }
72  
73      public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
74          long layoutSetId) throws com.liferay.portal.SystemException {
75          return getPersistence().fetchByPrimaryKey(layoutSetId);
76      }
77  
78      public static java.util.List findByGroupId(long groupId)
79          throws com.liferay.portal.SystemException {
80          return getPersistence().findByGroupId(groupId);
81      }
82  
83      public static java.util.List findByGroupId(long groupId, int begin, int end)
84          throws com.liferay.portal.SystemException {
85          return getPersistence().findByGroupId(groupId, begin, end);
86      }
87  
88      public static java.util.List findByGroupId(long groupId, int begin,
89          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
90          throws com.liferay.portal.SystemException {
91          return getPersistence().findByGroupId(groupId, begin, end, obc);
92      }
93  
94      public static com.liferay.portal.model.LayoutSet findByGroupId_First(
95          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException, 
97              com.liferay.portal.NoSuchLayoutSetException {
98          return getPersistence().findByGroupId_First(groupId, obc);
99      }
100 
101     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
102         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException, 
104             com.liferay.portal.NoSuchLayoutSetException {
105         return getPersistence().findByGroupId_Last(groupId, obc);
106     }
107 
108     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
109         long layoutSetId, long groupId,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portal.NoSuchLayoutSetException {
113         return getPersistence().findByGroupId_PrevAndNext(layoutSetId, groupId,
114             obc);
115     }
116 
117     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
118         java.lang.String virtualHost)
119         throws com.liferay.portal.SystemException, 
120             com.liferay.portal.NoSuchLayoutSetException {
121         return getPersistence().findByVirtualHost(virtualHost);
122     }
123 
124     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
125         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
126         return getPersistence().fetchByVirtualHost(virtualHost);
127     }
128 
129     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
130         boolean privateLayout)
131         throws com.liferay.portal.SystemException, 
132             com.liferay.portal.NoSuchLayoutSetException {
133         return getPersistence().findByG_P(groupId, privateLayout);
134     }
135 
136     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
137         boolean privateLayout) throws com.liferay.portal.SystemException {
138         return getPersistence().fetchByG_P(groupId, privateLayout);
139     }
140 
141     public static java.util.List findWithDynamicQuery(
142         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().findWithDynamicQuery(queryInitializer);
145     }
146 
147     public static java.util.List findWithDynamicQuery(
148         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
149         int begin, int end) throws com.liferay.portal.SystemException {
150         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
151             end);
152     }
153 
154     public static java.util.List findAll()
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findAll();
157     }
158 
159     public static java.util.List findAll(int begin, int end)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findAll(begin, end);
162     }
163 
164     public static java.util.List findAll(int begin, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findAll(begin, end, obc);
168     }
169 
170     public static void removeByGroupId(long groupId)
171         throws com.liferay.portal.SystemException {
172         getPersistence().removeByGroupId(groupId);
173     }
174 
175     public static void removeByVirtualHost(java.lang.String virtualHost)
176         throws com.liferay.portal.SystemException, 
177             com.liferay.portal.NoSuchLayoutSetException {
178         getPersistence().removeByVirtualHost(virtualHost);
179     }
180 
181     public static void removeByG_P(long groupId, boolean privateLayout)
182         throws com.liferay.portal.SystemException, 
183             com.liferay.portal.NoSuchLayoutSetException {
184         getPersistence().removeByG_P(groupId, privateLayout);
185     }
186 
187     public static void removeAll() throws com.liferay.portal.SystemException {
188         getPersistence().removeAll();
189     }
190 
191     public static int countByGroupId(long groupId)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().countByGroupId(groupId);
194     }
195 
196     public static int countByVirtualHost(java.lang.String virtualHost)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().countByVirtualHost(virtualHost);
199     }
200 
201     public static int countByG_P(long groupId, boolean privateLayout)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().countByG_P(groupId, privateLayout);
204     }
205 
206     public static int countAll() throws com.liferay.portal.SystemException {
207         return getPersistence().countAll();
208     }
209 
210     public static LayoutSetPersistence getPersistence() {
211         return _getUtil()._persistence;
212     }
213 
214     public void setPersistence(LayoutSetPersistence persistence) {
215         _persistence = persistence;
216     }
217 
218     private static LayoutSetUtil _getUtil() {
219         if (_util == null) {
220             _util = (LayoutSetUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
221         }
222 
223         return _util;
224     }
225 
226     private static final String _UTIL = LayoutSetUtil.class.getName();
227     private static LayoutSetUtil _util;
228     private LayoutSetPersistence _persistence;
229 }