1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.LayoutPrototype;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="LayoutPrototypeUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       LayoutPrototypePersistence
34   * @see       LayoutPrototypePersistenceImpl
35   * @generated
36   */
37  public class LayoutPrototypeUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static LayoutPrototype remove(LayoutPrototype layoutPrototype)
65          throws SystemException {
66          return getPersistence().remove(layoutPrototype);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static LayoutPrototype update(LayoutPrototype layoutPrototype,
73          boolean merge) throws SystemException {
74          return getPersistence().update(layoutPrototype, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.LayoutPrototype layoutPrototype) {
79          getPersistence().cacheResult(layoutPrototype);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.LayoutPrototype> layoutPrototypes) {
84          getPersistence().cacheResult(layoutPrototypes);
85      }
86  
87      public static com.liferay.portal.model.LayoutPrototype create(
88          long layoutPrototypeId) {
89          return getPersistence().create(layoutPrototypeId);
90      }
91  
92      public static com.liferay.portal.model.LayoutPrototype remove(
93          long layoutPrototypeId)
94          throws com.liferay.portal.NoSuchLayoutPrototypeException,
95              com.liferay.portal.kernel.exception.SystemException {
96          return getPersistence().remove(layoutPrototypeId);
97      }
98  
99      public static com.liferay.portal.model.LayoutPrototype updateImpl(
100         com.liferay.portal.model.LayoutPrototype layoutPrototype, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getPersistence().updateImpl(layoutPrototype, merge);
103     }
104 
105     public static com.liferay.portal.model.LayoutPrototype findByPrimaryKey(
106         long layoutPrototypeId)
107         throws com.liferay.portal.NoSuchLayoutPrototypeException,
108             com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().findByPrimaryKey(layoutPrototypeId);
110     }
111 
112     public static com.liferay.portal.model.LayoutPrototype fetchByPrimaryKey(
113         long layoutPrototypeId)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().fetchByPrimaryKey(layoutPrototypeId);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
119         long companyId)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByCompanyId(companyId);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
125         long companyId, int start, int end)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().findByCompanyId(companyId, start, end);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
131         long companyId, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence()
135                    .findByCompanyId(companyId, start, end, orderByComparator);
136     }
137 
138     public static com.liferay.portal.model.LayoutPrototype findByCompanyId_First(
139         long companyId,
140         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141         throws com.liferay.portal.NoSuchLayoutPrototypeException,
142             com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence()
144                    .findByCompanyId_First(companyId, orderByComparator);
145     }
146 
147     public static com.liferay.portal.model.LayoutPrototype findByCompanyId_Last(
148         long companyId,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.NoSuchLayoutPrototypeException,
151             com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByCompanyId_Last(companyId, orderByComparator);
154     }
155 
156     public static com.liferay.portal.model.LayoutPrototype[] findByCompanyId_PrevAndNext(
157         long layoutPrototypeId, long companyId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.NoSuchLayoutPrototypeException,
160             com.liferay.portal.kernel.exception.SystemException {
161         return getPersistence()
162                    .findByCompanyId_PrevAndNext(layoutPrototypeId, companyId,
163             orderByComparator);
164     }
165 
166     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
167         long companyId, boolean active)
168         throws com.liferay.portal.kernel.exception.SystemException {
169         return getPersistence().findByC_A(companyId, active);
170     }
171 
172     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
173         long companyId, boolean active, int start, int end)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getPersistence().findByC_A(companyId, active, start, end);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
179         long companyId, boolean active, int start, int end,
180         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence()
183                    .findByC_A(companyId, active, start, end, orderByComparator);
184     }
185 
186     public static com.liferay.portal.model.LayoutPrototype findByC_A_First(
187         long companyId, boolean active,
188         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189         throws com.liferay.portal.NoSuchLayoutPrototypeException,
190             com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence()
192                    .findByC_A_First(companyId, active, orderByComparator);
193     }
194 
195     public static com.liferay.portal.model.LayoutPrototype findByC_A_Last(
196         long companyId, boolean active,
197         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198         throws com.liferay.portal.NoSuchLayoutPrototypeException,
199             com.liferay.portal.kernel.exception.SystemException {
200         return getPersistence()
201                    .findByC_A_Last(companyId, active, orderByComparator);
202     }
203 
204     public static com.liferay.portal.model.LayoutPrototype[] findByC_A_PrevAndNext(
205         long layoutPrototypeId, long companyId, boolean active,
206         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207         throws com.liferay.portal.NoSuchLayoutPrototypeException,
208             com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence()
210                    .findByC_A_PrevAndNext(layoutPrototypeId, companyId, active,
211             orderByComparator);
212     }
213 
214     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll()
215         throws com.liferay.portal.kernel.exception.SystemException {
216         return getPersistence().findAll();
217     }
218 
219     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
220         int start, int end)
221         throws com.liferay.portal.kernel.exception.SystemException {
222         return getPersistence().findAll(start, end);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
226         int start, int end,
227         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228         throws com.liferay.portal.kernel.exception.SystemException {
229         return getPersistence().findAll(start, end, orderByComparator);
230     }
231 
232     public static void removeByCompanyId(long companyId)
233         throws com.liferay.portal.kernel.exception.SystemException {
234         getPersistence().removeByCompanyId(companyId);
235     }
236 
237     public static void removeByC_A(long companyId, boolean active)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         getPersistence().removeByC_A(companyId, active);
240     }
241 
242     public static void removeAll()
243         throws com.liferay.portal.kernel.exception.SystemException {
244         getPersistence().removeAll();
245     }
246 
247     public static int countByCompanyId(long companyId)
248         throws com.liferay.portal.kernel.exception.SystemException {
249         return getPersistence().countByCompanyId(companyId);
250     }
251 
252     public static int countByC_A(long companyId, boolean active)
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence().countByC_A(companyId, active);
255     }
256 
257     public static int countAll()
258         throws com.liferay.portal.kernel.exception.SystemException {
259         return getPersistence().countAll();
260     }
261 
262     public static LayoutPrototypePersistence getPersistence() {
263         if (_persistence == null) {
264             _persistence = (LayoutPrototypePersistence)PortalBeanLocatorUtil.locate(LayoutPrototypePersistence.class.getName());
265         }
266 
267         return _persistence;
268     }
269 
270     public void setPersistence(LayoutPrototypePersistence persistence) {
271         _persistence = persistence;
272     }
273 
274     private static LayoutPrototypePersistence _persistence;
275 }