1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="ListTypeUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class ListTypeUtil {
32      public static com.liferay.portal.model.ListType create(int listTypeId) {
33          return getPersistence().create(listTypeId);
34      }
35  
36      public static com.liferay.portal.model.ListType remove(int listTypeId)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchListTypeException {
39          return getPersistence().remove(listTypeId);
40      }
41  
42      public static com.liferay.portal.model.ListType remove(
43          com.liferay.portal.model.ListType listType)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(listType);
46      }
47  
48      public static com.liferay.portal.model.ListType update(
49          com.liferay.portal.model.ListType listType)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(listType);
52      }
53  
54      public static com.liferay.portal.model.ListType update(
55          com.liferay.portal.model.ListType listType, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(listType, merge);
58      }
59  
60      public static com.liferay.portal.model.ListType updateImpl(
61          com.liferay.portal.model.ListType listType, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(listType, merge);
64      }
65  
66      public static com.liferay.portal.model.ListType findByPrimaryKey(
67          int listTypeId)
68          throws com.liferay.portal.SystemException, 
69              com.liferay.portal.NoSuchListTypeException {
70          return getPersistence().findByPrimaryKey(listTypeId);
71      }
72  
73      public static com.liferay.portal.model.ListType fetchByPrimaryKey(
74          int listTypeId) throws com.liferay.portal.SystemException {
75          return getPersistence().fetchByPrimaryKey(listTypeId);
76      }
77  
78      public static java.util.List findByType(java.lang.String type)
79          throws com.liferay.portal.SystemException {
80          return getPersistence().findByType(type);
81      }
82  
83      public static java.util.List findByType(java.lang.String type, int begin,
84          int end) throws com.liferay.portal.SystemException {
85          return getPersistence().findByType(type, begin, end);
86      }
87  
88      public static java.util.List findByType(java.lang.String type, int begin,
89          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
90          throws com.liferay.portal.SystemException {
91          return getPersistence().findByType(type, begin, end, obc);
92      }
93  
94      public static com.liferay.portal.model.ListType findByType_First(
95          java.lang.String type,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException, 
98              com.liferay.portal.NoSuchListTypeException {
99          return getPersistence().findByType_First(type, obc);
100     }
101 
102     public static com.liferay.portal.model.ListType findByType_Last(
103         java.lang.String type,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchListTypeException {
107         return getPersistence().findByType_Last(type, obc);
108     }
109 
110     public static com.liferay.portal.model.ListType[] findByType_PrevAndNext(
111         int listTypeId, java.lang.String type,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portal.NoSuchListTypeException {
115         return getPersistence().findByType_PrevAndNext(listTypeId, type, obc);
116     }
117 
118     public static java.util.List findWithDynamicQuery(
119         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().findWithDynamicQuery(queryInitializer);
122     }
123 
124     public static java.util.List findWithDynamicQuery(
125         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
126         int begin, int end) throws com.liferay.portal.SystemException {
127         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
128             end);
129     }
130 
131     public static java.util.List findAll()
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findAll();
134     }
135 
136     public static java.util.List findAll(int begin, int end)
137         throws com.liferay.portal.SystemException {
138         return getPersistence().findAll(begin, end);
139     }
140 
141     public static java.util.List findAll(int begin, int end,
142         com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().findAll(begin, end, obc);
145     }
146 
147     public static void removeByType(java.lang.String type)
148         throws com.liferay.portal.SystemException {
149         getPersistence().removeByType(type);
150     }
151 
152     public static void removeAll() throws com.liferay.portal.SystemException {
153         getPersistence().removeAll();
154     }
155 
156     public static int countByType(java.lang.String type)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().countByType(type);
159     }
160 
161     public static int countAll() throws com.liferay.portal.SystemException {
162         return getPersistence().countAll();
163     }
164 
165     public static ListTypePersistence getPersistence() {
166         return _getUtil()._persistence;
167     }
168 
169     public void setPersistence(ListTypePersistence persistence) {
170         _persistence = persistence;
171     }
172 
173     private static ListTypeUtil _getUtil() {
174         if (_util == null) {
175             _util = (ListTypeUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
176         }
177 
178         return _util;
179     }
180 
181     private static final String _UTIL = ListTypeUtil.class.getName();
182     private static ListTypeUtil _util;
183     private ListTypePersistence _persistence;
184 }