001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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.ListType;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       ListTypePersistence
029     * @see       ListTypePersistenceImpl
030     * @generated
031     */
032    public class ListTypeUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(ListType listType) {
044                    getPersistence().clearCache(listType);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<ListType> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<ListType> 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            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static ListType remove(ListType listType) throws SystemException {
087                    return getPersistence().remove(listType);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
092             */
093            public static ListType update(ListType listType, boolean merge)
094                    throws SystemException {
095                    return getPersistence().update(listType, merge);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
100             */
101            public static ListType update(ListType listType, boolean merge,
102                    ServiceContext serviceContext) throws SystemException {
103                    return getPersistence().update(listType, merge, serviceContext);
104            }
105    
106            public static void cacheResult(com.liferay.portal.model.ListType listType) {
107                    getPersistence().cacheResult(listType);
108            }
109    
110            public static void cacheResult(
111                    java.util.List<com.liferay.portal.model.ListType> listTypes) {
112                    getPersistence().cacheResult(listTypes);
113            }
114    
115            public static com.liferay.portal.model.ListType create(int listTypeId) {
116                    return getPersistence().create(listTypeId);
117            }
118    
119            public static com.liferay.portal.model.ListType remove(int listTypeId)
120                    throws com.liferay.portal.NoSuchListTypeException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    return getPersistence().remove(listTypeId);
123            }
124    
125            public static com.liferay.portal.model.ListType updateImpl(
126                    com.liferay.portal.model.ListType listType, boolean merge)
127                    throws com.liferay.portal.kernel.exception.SystemException {
128                    return getPersistence().updateImpl(listType, merge);
129            }
130    
131            public static com.liferay.portal.model.ListType findByPrimaryKey(
132                    int listTypeId)
133                    throws com.liferay.portal.NoSuchListTypeException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getPersistence().findByPrimaryKey(listTypeId);
136            }
137    
138            public static com.liferay.portal.model.ListType fetchByPrimaryKey(
139                    int listTypeId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getPersistence().fetchByPrimaryKey(listTypeId);
142            }
143    
144            public static java.util.List<com.liferay.portal.model.ListType> findByType(
145                    java.lang.String type)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return getPersistence().findByType(type);
148            }
149    
150            public static java.util.List<com.liferay.portal.model.ListType> findByType(
151                    java.lang.String type, int start, int end)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getPersistence().findByType(type, start, end);
154            }
155    
156            public static java.util.List<com.liferay.portal.model.ListType> findByType(
157                    java.lang.String type, int start, int end,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().findByType(type, start, end, orderByComparator);
161            }
162    
163            public static com.liferay.portal.model.ListType findByType_First(
164                    java.lang.String type,
165                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166                    throws com.liferay.portal.NoSuchListTypeException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getPersistence().findByType_First(type, orderByComparator);
169            }
170    
171            public static com.liferay.portal.model.ListType findByType_Last(
172                    java.lang.String type,
173                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174                    throws com.liferay.portal.NoSuchListTypeException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getPersistence().findByType_Last(type, orderByComparator);
177            }
178    
179            public static com.liferay.portal.model.ListType[] findByType_PrevAndNext(
180                    int listTypeId, java.lang.String type,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchListTypeException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getPersistence()
185                                       .findByType_PrevAndNext(listTypeId, type, orderByComparator);
186            }
187    
188            public static java.util.List<com.liferay.portal.model.ListType> findAll()
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().findAll();
191            }
192    
193            public static java.util.List<com.liferay.portal.model.ListType> findAll(
194                    int start, int end)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence().findAll(start, end);
197            }
198    
199            public static java.util.List<com.liferay.portal.model.ListType> findAll(
200                    int start, int end,
201                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findAll(start, end, orderByComparator);
204            }
205    
206            public static void removeByType(java.lang.String type)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    getPersistence().removeByType(type);
209            }
210    
211            public static void removeAll()
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    getPersistence().removeAll();
214            }
215    
216            public static int countByType(java.lang.String type)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence().countByType(type);
219            }
220    
221            public static int countAll()
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().countAll();
224            }
225    
226            public static ListTypePersistence getPersistence() {
227                    if (_persistence == null) {
228                            _persistence = (ListTypePersistence)PortalBeanLocatorUtil.locate(ListTypePersistence.class.getName());
229                    }
230    
231                    return _persistence;
232            }
233    
234            public void setPersistence(ListTypePersistence persistence) {
235                    _persistence = persistence;
236            }
237    
238            private static ListTypePersistence _persistence;
239    }