001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.LayoutPrototype;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class LayoutPrototypeUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(LayoutPrototype layoutPrototype) {
044 getPersistence().clearCache(layoutPrototype);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<LayoutPrototype> findWithDynamicQuery(
059 DynamicQuery dynamicQuery) throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<LayoutPrototype> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<LayoutPrototype> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static LayoutPrototype remove(LayoutPrototype layoutPrototype)
087 throws SystemException {
088 return getPersistence().remove(layoutPrototype);
089 }
090
091
094 public static LayoutPrototype update(LayoutPrototype layoutPrototype,
095 boolean merge) throws SystemException {
096 return getPersistence().update(layoutPrototype, merge);
097 }
098
099
102 public static LayoutPrototype update(LayoutPrototype layoutPrototype,
103 boolean merge, ServiceContext serviceContext) throws SystemException {
104 return getPersistence().update(layoutPrototype, merge, serviceContext);
105 }
106
107 public static void cacheResult(
108 com.liferay.portal.model.LayoutPrototype layoutPrototype) {
109 getPersistence().cacheResult(layoutPrototype);
110 }
111
112 public static void cacheResult(
113 java.util.List<com.liferay.portal.model.LayoutPrototype> layoutPrototypes) {
114 getPersistence().cacheResult(layoutPrototypes);
115 }
116
117 public static com.liferay.portal.model.LayoutPrototype create(
118 long layoutPrototypeId) {
119 return getPersistence().create(layoutPrototypeId);
120 }
121
122 public static com.liferay.portal.model.LayoutPrototype remove(
123 long layoutPrototypeId)
124 throws com.liferay.portal.NoSuchLayoutPrototypeException,
125 com.liferay.portal.kernel.exception.SystemException {
126 return getPersistence().remove(layoutPrototypeId);
127 }
128
129 public static com.liferay.portal.model.LayoutPrototype updateImpl(
130 com.liferay.portal.model.LayoutPrototype layoutPrototype, boolean merge)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getPersistence().updateImpl(layoutPrototype, merge);
133 }
134
135 public static com.liferay.portal.model.LayoutPrototype findByPrimaryKey(
136 long layoutPrototypeId)
137 throws com.liferay.portal.NoSuchLayoutPrototypeException,
138 com.liferay.portal.kernel.exception.SystemException {
139 return getPersistence().findByPrimaryKey(layoutPrototypeId);
140 }
141
142 public static com.liferay.portal.model.LayoutPrototype fetchByPrimaryKey(
143 long layoutPrototypeId)
144 throws com.liferay.portal.kernel.exception.SystemException {
145 return getPersistence().fetchByPrimaryKey(layoutPrototypeId);
146 }
147
148 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
149 long companyId)
150 throws com.liferay.portal.kernel.exception.SystemException {
151 return getPersistence().findByCompanyId(companyId);
152 }
153
154 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
155 long companyId, int start, int end)
156 throws com.liferay.portal.kernel.exception.SystemException {
157 return getPersistence().findByCompanyId(companyId, start, end);
158 }
159
160 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
161 long companyId, int start, int end,
162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getPersistence()
165 .findByCompanyId(companyId, start, end, orderByComparator);
166 }
167
168 public static com.liferay.portal.model.LayoutPrototype findByCompanyId_First(
169 long companyId,
170 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171 throws com.liferay.portal.NoSuchLayoutPrototypeException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getPersistence()
174 .findByCompanyId_First(companyId, orderByComparator);
175 }
176
177 public static com.liferay.portal.model.LayoutPrototype findByCompanyId_Last(
178 long companyId,
179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180 throws com.liferay.portal.NoSuchLayoutPrototypeException,
181 com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence()
183 .findByCompanyId_Last(companyId, orderByComparator);
184 }
185
186 public static com.liferay.portal.model.LayoutPrototype[] findByCompanyId_PrevAndNext(
187 long layoutPrototypeId, long companyId,
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 .findByCompanyId_PrevAndNext(layoutPrototypeId, companyId,
193 orderByComparator);
194 }
195
196 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
197 long companyId, boolean active)
198 throws com.liferay.portal.kernel.exception.SystemException {
199 return getPersistence().findByC_A(companyId, active);
200 }
201
202 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
203 long companyId, boolean active, int start, int end)
204 throws com.liferay.portal.kernel.exception.SystemException {
205 return getPersistence().findByC_A(companyId, active, start, end);
206 }
207
208 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
209 long companyId, boolean active, int start, int end,
210 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211 throws com.liferay.portal.kernel.exception.SystemException {
212 return getPersistence()
213 .findByC_A(companyId, active, start, end, orderByComparator);
214 }
215
216 public static com.liferay.portal.model.LayoutPrototype findByC_A_First(
217 long companyId, boolean active,
218 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219 throws com.liferay.portal.NoSuchLayoutPrototypeException,
220 com.liferay.portal.kernel.exception.SystemException {
221 return getPersistence()
222 .findByC_A_First(companyId, active, orderByComparator);
223 }
224
225 public static com.liferay.portal.model.LayoutPrototype findByC_A_Last(
226 long companyId, boolean active,
227 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228 throws com.liferay.portal.NoSuchLayoutPrototypeException,
229 com.liferay.portal.kernel.exception.SystemException {
230 return getPersistence()
231 .findByC_A_Last(companyId, active, orderByComparator);
232 }
233
234 public static com.liferay.portal.model.LayoutPrototype[] findByC_A_PrevAndNext(
235 long layoutPrototypeId, long companyId, boolean active,
236 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
237 throws com.liferay.portal.NoSuchLayoutPrototypeException,
238 com.liferay.portal.kernel.exception.SystemException {
239 return getPersistence()
240 .findByC_A_PrevAndNext(layoutPrototypeId, companyId, active,
241 orderByComparator);
242 }
243
244 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll()
245 throws com.liferay.portal.kernel.exception.SystemException {
246 return getPersistence().findAll();
247 }
248
249 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
250 int start, int end)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getPersistence().findAll(start, end);
253 }
254
255 public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
256 int start, int end,
257 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getPersistence().findAll(start, end, orderByComparator);
260 }
261
262 public static void removeByCompanyId(long companyId)
263 throws com.liferay.portal.kernel.exception.SystemException {
264 getPersistence().removeByCompanyId(companyId);
265 }
266
267 public static void removeByC_A(long companyId, boolean active)
268 throws com.liferay.portal.kernel.exception.SystemException {
269 getPersistence().removeByC_A(companyId, active);
270 }
271
272 public static void removeAll()
273 throws com.liferay.portal.kernel.exception.SystemException {
274 getPersistence().removeAll();
275 }
276
277 public static int countByCompanyId(long companyId)
278 throws com.liferay.portal.kernel.exception.SystemException {
279 return getPersistence().countByCompanyId(companyId);
280 }
281
282 public static int countByC_A(long companyId, boolean active)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 return getPersistence().countByC_A(companyId, active);
285 }
286
287 public static int countAll()
288 throws com.liferay.portal.kernel.exception.SystemException {
289 return getPersistence().countAll();
290 }
291
292 public static LayoutPrototypePersistence getPersistence() {
293 if (_persistence == null) {
294 _persistence = (LayoutPrototypePersistence)PortalBeanLocatorUtil.locate(LayoutPrototypePersistence.class.getName());
295 }
296
297 return _persistence;
298 }
299
300 public void setPersistence(LayoutPrototypePersistence persistence) {
301 _persistence = persistence;
302 }
303
304 private static LayoutPrototypePersistence _persistence;
305 }