1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  /**
27   * <a href="ListTypeUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       ListTypePersistence
36   * @see       ListTypePersistenceImpl
37   * @generated
38   */
39  public class ListTypeUtil {
40      public static void cacheResult(com.liferay.portal.model.ListType listType) {
41          getPersistence().cacheResult(listType);
42      }
43  
44      public static void cacheResult(
45          java.util.List<com.liferay.portal.model.ListType> listTypes) {
46          getPersistence().cacheResult(listTypes);
47      }
48  
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      public static com.liferay.portal.model.ListType create(int listTypeId) {
54          return getPersistence().create(listTypeId);
55      }
56  
57      public static com.liferay.portal.model.ListType remove(int listTypeId)
58          throws com.liferay.portal.NoSuchListTypeException,
59              com.liferay.portal.SystemException {
60          return getPersistence().remove(listTypeId);
61      }
62  
63      public static com.liferay.portal.model.ListType remove(
64          com.liferay.portal.model.ListType listType)
65          throws com.liferay.portal.SystemException {
66          return getPersistence().remove(listType);
67      }
68  
69      /**
70       * @deprecated Use {@link #update(ListType, boolean merge)}.
71       */
72      public static com.liferay.portal.model.ListType update(
73          com.liferay.portal.model.ListType listType)
74          throws com.liferay.portal.SystemException {
75          return getPersistence().update(listType);
76      }
77  
78      /**
79       * Add, update, or merge, the entity. This method also calls the model
80       * listeners to trigger the proper events associated with adding, deleting,
81       * or updating an entity.
82       *
83       * @param  listType the entity to add, update, or merge
84       * @param  merge boolean value for whether to merge the entity. The default
85       *         value is false. Setting merge to true is more expensive and
86       *         should only be true when listType is transient. See
87       *         LEP-5473 for a detailed discussion of this method.
88       * @return the entity that was added, updated, or merged
89       */
90      public static com.liferay.portal.model.ListType update(
91          com.liferay.portal.model.ListType listType, boolean merge)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().update(listType, merge);
94      }
95  
96      public static com.liferay.portal.model.ListType updateImpl(
97          com.liferay.portal.model.ListType listType, boolean merge)
98          throws com.liferay.portal.SystemException {
99          return getPersistence().updateImpl(listType, merge);
100     }
101 
102     public static com.liferay.portal.model.ListType findByPrimaryKey(
103         int listTypeId)
104         throws com.liferay.portal.NoSuchListTypeException,
105             com.liferay.portal.SystemException {
106         return getPersistence().findByPrimaryKey(listTypeId);
107     }
108 
109     public static com.liferay.portal.model.ListType fetchByPrimaryKey(
110         int listTypeId) throws com.liferay.portal.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) throws com.liferay.portal.SystemException {
116         return getPersistence().findByType(type);
117     }
118 
119     public static java.util.List<com.liferay.portal.model.ListType> findByType(
120         java.lang.String type, int start, int end)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByType(type, start, end);
123     }
124 
125     public static java.util.List<com.liferay.portal.model.ListType> findByType(
126         java.lang.String type, int start, int end,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().findByType(type, start, end, obc);
130     }
131 
132     public static com.liferay.portal.model.ListType findByType_First(
133         java.lang.String type,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.NoSuchListTypeException,
136             com.liferay.portal.SystemException {
137         return getPersistence().findByType_First(type, obc);
138     }
139 
140     public static com.liferay.portal.model.ListType findByType_Last(
141         java.lang.String type,
142         com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.NoSuchListTypeException,
144             com.liferay.portal.SystemException {
145         return getPersistence().findByType_Last(type, obc);
146     }
147 
148     public static com.liferay.portal.model.ListType[] findByType_PrevAndNext(
149         int listTypeId, java.lang.String type,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.NoSuchListTypeException,
152             com.liferay.portal.SystemException {
153         return getPersistence().findByType_PrevAndNext(listTypeId, type, obc);
154     }
155 
156     public static java.util.List<Object> findWithDynamicQuery(
157         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findWithDynamicQuery(dynamicQuery);
160     }
161 
162     public static java.util.List<Object> findWithDynamicQuery(
163         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
164         int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.ListType> findAll()
169         throws com.liferay.portal.SystemException {
170         return getPersistence().findAll();
171     }
172 
173     public static java.util.List<com.liferay.portal.model.ListType> findAll(
174         int start, int end) throws com.liferay.portal.SystemException {
175         return getPersistence().findAll(start, end);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.ListType> findAll(
179         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findAll(start, end, obc);
182     }
183 
184     public static void removeByType(java.lang.String type)
185         throws com.liferay.portal.SystemException {
186         getPersistence().removeByType(type);
187     }
188 
189     public static void removeAll() throws com.liferay.portal.SystemException {
190         getPersistence().removeAll();
191     }
192 
193     public static int countByType(java.lang.String type)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().countByType(type);
196     }
197 
198     public static int countAll() throws com.liferay.portal.SystemException {
199         return getPersistence().countAll();
200     }
201 
202     public static ListTypePersistence getPersistence() {
203         return _persistence;
204     }
205 
206     public void setPersistence(ListTypePersistence persistence) {
207         _persistence = persistence;
208     }
209 
210     private static ListTypePersistence _persistence;
211 }