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.Image;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       ImagePersistence
029     * @see       ImagePersistenceImpl
030     * @generated
031     */
032    public class ImageUtil {
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(Image image) {
044                    getPersistence().clearCache(image);
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<Image> 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<Image> findWithDynamicQuery(DynamicQuery dynamicQuery,
067                    int start, int end) throws SystemException {
068                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
073             */
074            public static List<Image> findWithDynamicQuery(DynamicQuery dynamicQuery,
075                    int start, int end, OrderByComparator orderByComparator)
076                    throws SystemException {
077                    return getPersistence()
078                                       .findWithDynamicQuery(dynamicQuery, start, end,
079                            orderByComparator);
080            }
081    
082            /**
083             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
084             */
085            public static Image remove(Image image) throws SystemException {
086                    return getPersistence().remove(image);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
091             */
092            public static Image update(Image image, boolean merge)
093                    throws SystemException {
094                    return getPersistence().update(image, merge);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
099             */
100            public static Image update(Image image, boolean merge,
101                    ServiceContext serviceContext) throws SystemException {
102                    return getPersistence().update(image, merge, serviceContext);
103            }
104    
105            public static void cacheResult(com.liferay.portal.model.Image image) {
106                    getPersistence().cacheResult(image);
107            }
108    
109            public static void cacheResult(
110                    java.util.List<com.liferay.portal.model.Image> images) {
111                    getPersistence().cacheResult(images);
112            }
113    
114            public static com.liferay.portal.model.Image create(long imageId) {
115                    return getPersistence().create(imageId);
116            }
117    
118            public static com.liferay.portal.model.Image remove(long imageId)
119                    throws com.liferay.portal.NoSuchImageException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getPersistence().remove(imageId);
122            }
123    
124            public static com.liferay.portal.model.Image updateImpl(
125                    com.liferay.portal.model.Image image, boolean merge)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getPersistence().updateImpl(image, merge);
128            }
129    
130            public static com.liferay.portal.model.Image findByPrimaryKey(long imageId)
131                    throws com.liferay.portal.NoSuchImageException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    return getPersistence().findByPrimaryKey(imageId);
134            }
135    
136            public static com.liferay.portal.model.Image fetchByPrimaryKey(long imageId)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getPersistence().fetchByPrimaryKey(imageId);
139            }
140    
141            public static java.util.List<com.liferay.portal.model.Image> findByLtSize(
142                    int size) throws com.liferay.portal.kernel.exception.SystemException {
143                    return getPersistence().findByLtSize(size);
144            }
145    
146            public static java.util.List<com.liferay.portal.model.Image> findByLtSize(
147                    int size, int start, int end)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return getPersistence().findByLtSize(size, start, end);
150            }
151    
152            public static java.util.List<com.liferay.portal.model.Image> findByLtSize(
153                    int size, int start, int end,
154                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().findByLtSize(size, start, end, orderByComparator);
157            }
158    
159            public static com.liferay.portal.model.Image findByLtSize_First(int size,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.NoSuchImageException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().findByLtSize_First(size, orderByComparator);
164            }
165    
166            public static com.liferay.portal.model.Image findByLtSize_Last(int size,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.NoSuchImageException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence().findByLtSize_Last(size, orderByComparator);
171            }
172    
173            public static com.liferay.portal.model.Image[] findByLtSize_PrevAndNext(
174                    long imageId, int size,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.NoSuchImageException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence()
179                                       .findByLtSize_PrevAndNext(imageId, size, orderByComparator);
180            }
181    
182            public static java.util.List<com.liferay.portal.model.Image> findAll()
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return getPersistence().findAll();
185            }
186    
187            public static java.util.List<com.liferay.portal.model.Image> findAll(
188                    int start, int end)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().findAll(start, end);
191            }
192    
193            public static java.util.List<com.liferay.portal.model.Image> findAll(
194                    int start, int end,
195                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return getPersistence().findAll(start, end, orderByComparator);
198            }
199    
200            public static void removeByLtSize(int size)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    getPersistence().removeByLtSize(size);
203            }
204    
205            public static void removeAll()
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    getPersistence().removeAll();
208            }
209    
210            public static int countByLtSize(int size)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().countByLtSize(size);
213            }
214    
215            public static int countAll()
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return getPersistence().countAll();
218            }
219    
220            public static ImagePersistence getPersistence() {
221                    if (_persistence == null) {
222                            _persistence = (ImagePersistence)PortalBeanLocatorUtil.locate(ImagePersistence.class.getName());
223                    }
224    
225                    return _persistence;
226            }
227    
228            public void setPersistence(ImagePersistence persistence) {
229                    _persistence = persistence;
230            }
231    
232            private static ImagePersistence _persistence;
233    }