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.ListType;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ListTypeUtil.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       ListTypePersistence
34   * @see       ListTypePersistenceImpl
35   * @generated
36   */
37  public class ListTypeUtil {
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 ListType remove(ListType listType) throws SystemException {
65          return getPersistence().remove(listType);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static ListType update(ListType listType, boolean merge)
72          throws SystemException {
73          return getPersistence().update(listType, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.ListType listType) {
77          getPersistence().cacheResult(listType);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.ListType> listTypes) {
82          getPersistence().cacheResult(listTypes);
83      }
84  
85      public static com.liferay.portal.model.ListType create(int listTypeId) {
86          return getPersistence().create(listTypeId);
87      }
88  
89      public static com.liferay.portal.model.ListType remove(int listTypeId)
90          throws com.liferay.portal.NoSuchListTypeException,
91              com.liferay.portal.kernel.exception.SystemException {
92          return getPersistence().remove(listTypeId);
93      }
94  
95      public static com.liferay.portal.model.ListType updateImpl(
96          com.liferay.portal.model.ListType listType, boolean merge)
97          throws com.liferay.portal.kernel.exception.SystemException {
98          return getPersistence().updateImpl(listType, merge);
99      }
100 
101     public static com.liferay.portal.model.ListType findByPrimaryKey(
102         int listTypeId)
103         throws com.liferay.portal.NoSuchListTypeException,
104             com.liferay.portal.kernel.exception.SystemException {
105         return getPersistence().findByPrimaryKey(listTypeId);
106     }
107 
108     public static com.liferay.portal.model.ListType fetchByPrimaryKey(
109         int listTypeId)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getPersistence().fetchByPrimaryKey(listTypeId);
112     }
113 
114     public static java.util.List<com.liferay.portal.model.ListType> findByType(
115         java.lang.String type)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().findByType(type);
118     }
119 
120     public static java.util.List<com.liferay.portal.model.ListType> findByType(
121         java.lang.String type, int start, int end)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByType(type, start, end);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.ListType> findByType(
127         java.lang.String type, int start, int end,
128         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
129         throws com.liferay.portal.kernel.exception.SystemException {
130         return getPersistence().findByType(type, start, end, orderByComparator);
131     }
132 
133     public static com.liferay.portal.model.ListType findByType_First(
134         java.lang.String type,
135         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
136         throws com.liferay.portal.NoSuchListTypeException,
137             com.liferay.portal.kernel.exception.SystemException {
138         return getPersistence().findByType_First(type, orderByComparator);
139     }
140 
141     public static com.liferay.portal.model.ListType findByType_Last(
142         java.lang.String type,
143         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144         throws com.liferay.portal.NoSuchListTypeException,
145             com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence().findByType_Last(type, orderByComparator);
147     }
148 
149     public static com.liferay.portal.model.ListType[] findByType_PrevAndNext(
150         int listTypeId, java.lang.String type,
151         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152         throws com.liferay.portal.NoSuchListTypeException,
153             com.liferay.portal.kernel.exception.SystemException {
154         return getPersistence()
155                    .findByType_PrevAndNext(listTypeId, type, orderByComparator);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.ListType> findAll()
159         throws com.liferay.portal.kernel.exception.SystemException {
160         return getPersistence().findAll();
161     }
162 
163     public static java.util.List<com.liferay.portal.model.ListType> findAll(
164         int start, int end)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findAll(start, end);
167     }
168 
169     public static java.util.List<com.liferay.portal.model.ListType> findAll(
170         int start, int end,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.kernel.exception.SystemException {
173         return getPersistence().findAll(start, end, orderByComparator);
174     }
175 
176     public static void removeByType(java.lang.String type)
177         throws com.liferay.portal.kernel.exception.SystemException {
178         getPersistence().removeByType(type);
179     }
180 
181     public static void removeAll()
182         throws com.liferay.portal.kernel.exception.SystemException {
183         getPersistence().removeAll();
184     }
185 
186     public static int countByType(java.lang.String type)
187         throws com.liferay.portal.kernel.exception.SystemException {
188         return getPersistence().countByType(type);
189     }
190 
191     public static int countAll()
192         throws com.liferay.portal.kernel.exception.SystemException {
193         return getPersistence().countAll();
194     }
195 
196     public static ListTypePersistence getPersistence() {
197         if (_persistence == null) {
198             _persistence = (ListTypePersistence)PortalBeanLocatorUtil.locate(ListTypePersistence.class.getName());
199         }
200 
201         return _persistence;
202     }
203 
204     public void setPersistence(ListTypePersistence persistence) {
205         _persistence = persistence;
206     }
207 
208     private static ListTypePersistence _persistence;
209 }