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.portlet.journal.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.service.ServiceContext;
022    
023    import com.liferay.portlet.journal.model.JournalArticleResource;
024    
025    import java.util.List;
026    
027    /**
028     * @author    Brian Wing Shun Chan
029     * @see       JournalArticleResourcePersistence
030     * @see       JournalArticleResourcePersistenceImpl
031     * @generated
032     */
033    public class JournalArticleResourceUtil {
034            /**
035             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
036             */
037            public static void clearCache() {
038                    getPersistence().clearCache();
039            }
040    
041            /**
042             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
043             */
044            public static void clearCache(JournalArticleResource journalArticleResource) {
045                    getPersistence().clearCache(journalArticleResource);
046            }
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
050             */
051            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052                    throws SystemException {
053                    return getPersistence().countWithDynamicQuery(dynamicQuery);
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
058             */
059            public static List<JournalArticleResource> findWithDynamicQuery(
060                    DynamicQuery dynamicQuery) throws SystemException {
061                    return getPersistence().findWithDynamicQuery(dynamicQuery);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
066             */
067            public static List<JournalArticleResource> findWithDynamicQuery(
068                    DynamicQuery dynamicQuery, int start, int end)
069                    throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
075             */
076            public static List<JournalArticleResource> findWithDynamicQuery(
077                    DynamicQuery dynamicQuery, int start, int end,
078                    OrderByComparator orderByComparator) throws SystemException {
079                    return getPersistence()
080                                       .findWithDynamicQuery(dynamicQuery, start, end,
081                            orderByComparator);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
086             */
087            public static JournalArticleResource remove(
088                    JournalArticleResource journalArticleResource)
089                    throws SystemException {
090                    return getPersistence().remove(journalArticleResource);
091            }
092    
093            /**
094             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
095             */
096            public static JournalArticleResource update(
097                    JournalArticleResource journalArticleResource, boolean merge)
098                    throws SystemException {
099                    return getPersistence().update(journalArticleResource, merge);
100            }
101    
102            /**
103             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
104             */
105            public static JournalArticleResource update(
106                    JournalArticleResource journalArticleResource, boolean merge,
107                    ServiceContext serviceContext) throws SystemException {
108                    return getPersistence()
109                                       .update(journalArticleResource, merge, serviceContext);
110            }
111    
112            public static void cacheResult(
113                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
114                    getPersistence().cacheResult(journalArticleResource);
115            }
116    
117            public static void cacheResult(
118                    java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources) {
119                    getPersistence().cacheResult(journalArticleResources);
120            }
121    
122            public static com.liferay.portlet.journal.model.JournalArticleResource create(
123                    long resourcePrimKey) {
124                    return getPersistence().create(resourcePrimKey);
125            }
126    
127            public static com.liferay.portlet.journal.model.JournalArticleResource remove(
128                    long resourcePrimKey)
129                    throws com.liferay.portal.kernel.exception.SystemException,
130                            com.liferay.portlet.journal.NoSuchArticleResourceException {
131                    return getPersistence().remove(resourcePrimKey);
132            }
133    
134            public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
135                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
136                    boolean merge)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getPersistence().updateImpl(journalArticleResource, merge);
139            }
140    
141            public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
142                    long resourcePrimKey)
143                    throws com.liferay.portal.kernel.exception.SystemException,
144                            com.liferay.portlet.journal.NoSuchArticleResourceException {
145                    return getPersistence().findByPrimaryKey(resourcePrimKey);
146            }
147    
148            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
149                    long resourcePrimKey)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return getPersistence().fetchByPrimaryKey(resourcePrimKey);
152            }
153    
154            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
155                    long groupId)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().findByGroupId(groupId);
158            }
159    
160            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
161                    long groupId, int start, int end)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().findByGroupId(groupId, start, end);
164            }
165    
166            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
167                    long groupId, int start, int end,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence()
171                                       .findByGroupId(groupId, start, end, orderByComparator);
172            }
173    
174            public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
175                    long groupId,
176                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177                    throws com.liferay.portal.kernel.exception.SystemException,
178                            com.liferay.portlet.journal.NoSuchArticleResourceException {
179                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
180            }
181    
182            public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
183                    long groupId,
184                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185                    throws com.liferay.portal.kernel.exception.SystemException,
186                            com.liferay.portlet.journal.NoSuchArticleResourceException {
187                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
188            }
189    
190            public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
191                    long resourcePrimKey, long groupId,
192                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193                    throws com.liferay.portal.kernel.exception.SystemException,
194                            com.liferay.portlet.journal.NoSuchArticleResourceException {
195                    return getPersistence()
196                                       .findByGroupId_PrevAndNext(resourcePrimKey, groupId,
197                            orderByComparator);
198            }
199    
200            public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
201                    long groupId, java.lang.String articleId)
202                    throws com.liferay.portal.kernel.exception.SystemException,
203                            com.liferay.portlet.journal.NoSuchArticleResourceException {
204                    return getPersistence().findByG_A(groupId, articleId);
205            }
206    
207            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
208                    long groupId, java.lang.String articleId)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getPersistence().fetchByG_A(groupId, articleId);
211            }
212    
213            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
214                    long groupId, java.lang.String articleId, boolean retrieveFromCache)
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
217            }
218    
219            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findAll();
222            }
223    
224            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
225                    int start, int end)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findAll(start, end);
228            }
229    
230            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
231                    int start, int end,
232                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getPersistence().findAll(start, end, orderByComparator);
235            }
236    
237            public static void removeByGroupId(long groupId)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    getPersistence().removeByGroupId(groupId);
240            }
241    
242            public static void removeByG_A(long groupId, java.lang.String articleId)
243                    throws com.liferay.portal.kernel.exception.SystemException,
244                            com.liferay.portlet.journal.NoSuchArticleResourceException {
245                    getPersistence().removeByG_A(groupId, articleId);
246            }
247    
248            public static void removeAll()
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    getPersistence().removeAll();
251            }
252    
253            public static int countByGroupId(long groupId)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getPersistence().countByGroupId(groupId);
256            }
257    
258            public static int countByG_A(long groupId, java.lang.String articleId)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence().countByG_A(groupId, articleId);
261            }
262    
263            public static int countAll()
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence().countAll();
266            }
267    
268            public static JournalArticleResourcePersistence getPersistence() {
269                    if (_persistence == null) {
270                            _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
271                    }
272    
273                    return _persistence;
274            }
275    
276            public void setPersistence(JournalArticleResourcePersistence persistence) {
277                    _persistence = persistence;
278            }
279    
280            private static JournalArticleResourcePersistence _persistence;
281    }