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#clearCache(ListType)
47       */
48      public static void clearCache(ListType listType) {
49          getPersistence().clearCache(listType);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery)
64          throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<ListType> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static ListType remove(ListType listType) throws SystemException {
81          return getPersistence().remove(listType);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static ListType update(ListType listType, boolean merge)
88          throws SystemException {
89          return getPersistence().update(listType, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.ListType listType) {
93          getPersistence().cacheResult(listType);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.ListType> listTypes) {
98          getPersistence().cacheResult(listTypes);
99      }
100 
101     public static com.liferay.portal.model.ListType create(int listTypeId) {
102         return getPersistence().create(listTypeId);
103     }
104 
105     public static com.liferay.portal.model.ListType remove(int listTypeId)
106         throws com.liferay.portal.NoSuchListTypeException,
107             com.liferay.portal.kernel.exception.SystemException {
108         return getPersistence().remove(listTypeId);
109     }
110 
111     public static com.liferay.portal.model.ListType updateImpl(
112         com.liferay.portal.model.ListType listType, boolean merge)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getPersistence().updateImpl(listType, merge);
115     }
116 
117     public static com.liferay.portal.model.ListType findByPrimaryKey(
118         int listTypeId)
119         throws com.liferay.portal.NoSuchListTypeException,
120             com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByPrimaryKey(listTypeId);
122     }
123 
124     public static com.liferay.portal.model.ListType fetchByPrimaryKey(
125         int listTypeId)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().fetchByPrimaryKey(listTypeId);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.ListType> findByType(
131         java.lang.String type)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().findByType(type);
134     }
135 
136     public static java.util.List<com.liferay.portal.model.ListType> findByType(
137         java.lang.String type, int start, int end)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByType(type, start, end);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.ListType> findByType(
143         java.lang.String type, int start, int end,
144         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145         throws com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence().findByType(type, start, end, orderByComparator);
147     }
148 
149     public static com.liferay.portal.model.ListType findByType_First(
150         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().findByType_First(type, orderByComparator);
155     }
156 
157     public static com.liferay.portal.model.ListType findByType_Last(
158         java.lang.String type,
159         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160         throws com.liferay.portal.NoSuchListTypeException,
161             com.liferay.portal.kernel.exception.SystemException {
162         return getPersistence().findByType_Last(type, orderByComparator);
163     }
164 
165     public static com.liferay.portal.model.ListType[] findByType_PrevAndNext(
166         int listTypeId, java.lang.String type,
167         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168         throws com.liferay.portal.NoSuchListTypeException,
169             com.liferay.portal.kernel.exception.SystemException {
170         return getPersistence()
171                    .findByType_PrevAndNext(listTypeId, type, orderByComparator);
172     }
173 
174     public static java.util.List<com.liferay.portal.model.ListType> findAll()
175         throws com.liferay.portal.kernel.exception.SystemException {
176         return getPersistence().findAll();
177     }
178 
179     public static java.util.List<com.liferay.portal.model.ListType> findAll(
180         int start, int end)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence().findAll(start, end);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.ListType> findAll(
186         int start, int end,
187         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188         throws com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().findAll(start, end, orderByComparator);
190     }
191 
192     public static void removeByType(java.lang.String type)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         getPersistence().removeByType(type);
195     }
196 
197     public static void removeAll()
198         throws com.liferay.portal.kernel.exception.SystemException {
199         getPersistence().removeAll();
200     }
201 
202     public static int countByType(java.lang.String type)
203         throws com.liferay.portal.kernel.exception.SystemException {
204         return getPersistence().countByType(type);
205     }
206 
207     public static int countAll()
208         throws com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().countAll();
210     }
211 
212     public static ListTypePersistence getPersistence() {
213         if (_persistence == null) {
214             _persistence = (ListTypePersistence)PortalBeanLocatorUtil.locate(ListTypePersistence.class.getName());
215         }
216 
217         return _persistence;
218     }
219 
220     public void setPersistence(ListTypePersistence persistence) {
221         _persistence = persistence;
222     }
223 
224     private static ListTypePersistence _persistence;
225 }