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.social.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.social.model.SocialEquityHistory;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the social equity history service.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see SocialEquityHistoryPersistence
036     * @see SocialEquityHistoryPersistenceImpl
037     * @generated
038     */
039    public class SocialEquityHistoryUtil {
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
042             */
043            public static void clearCache() {
044                    getPersistence().clearCache();
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
049             */
050            public static void clearCache(SocialEquityHistory socialEquityHistory) {
051                    getPersistence().clearCache(socialEquityHistory);
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
056             */
057            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
058                    throws SystemException {
059                    return getPersistence().countWithDynamicQuery(dynamicQuery);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
064             */
065            public static List<SocialEquityHistory> findWithDynamicQuery(
066                    DynamicQuery dynamicQuery) throws SystemException {
067                    return getPersistence().findWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
072             */
073            public static List<SocialEquityHistory> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery, int start, int end)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
081             */
082            public static List<SocialEquityHistory> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end,
084                    OrderByComparator orderByComparator) throws SystemException {
085                    return getPersistence()
086                                       .findWithDynamicQuery(dynamicQuery, start, end,
087                            orderByComparator);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
092             */
093            public static SocialEquityHistory remove(
094                    SocialEquityHistory socialEquityHistory) throws SystemException {
095                    return getPersistence().remove(socialEquityHistory);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static SocialEquityHistory update(
102                    SocialEquityHistory socialEquityHistory, boolean merge)
103                    throws SystemException {
104                    return getPersistence().update(socialEquityHistory, merge);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
109             */
110            public static SocialEquityHistory update(
111                    SocialEquityHistory socialEquityHistory, boolean merge,
112                    ServiceContext serviceContext) throws SystemException {
113                    return getPersistence()
114                                       .update(socialEquityHistory, merge, serviceContext);
115            }
116    
117            /**
118            * Caches the social equity history in the entity cache if it is enabled.
119            *
120            * @param socialEquityHistory the social equity history to cache
121            */
122            public static void cacheResult(
123                    com.liferay.portlet.social.model.SocialEquityHistory socialEquityHistory) {
124                    getPersistence().cacheResult(socialEquityHistory);
125            }
126    
127            /**
128            * Caches the social equity histories in the entity cache if it is enabled.
129            *
130            * @param socialEquityHistories the social equity histories to cache
131            */
132            public static void cacheResult(
133                    java.util.List<com.liferay.portlet.social.model.SocialEquityHistory> socialEquityHistories) {
134                    getPersistence().cacheResult(socialEquityHistories);
135            }
136    
137            /**
138            * Creates a new social equity history with the primary key.
139            *
140            * @param equityHistoryId the primary key for the new social equity history
141            * @return the new social equity history
142            */
143            public static com.liferay.portlet.social.model.SocialEquityHistory create(
144                    long equityHistoryId) {
145                    return getPersistence().create(equityHistoryId);
146            }
147    
148            /**
149            * Removes the social equity history with the primary key from the database. Also notifies the appropriate model listeners.
150            *
151            * @param equityHistoryId the primary key of the social equity history to remove
152            * @return the social equity history that was removed
153            * @throws com.liferay.portlet.social.NoSuchEquityHistoryException if a social equity history with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public static com.liferay.portlet.social.model.SocialEquityHistory remove(
157                    long equityHistoryId)
158                    throws com.liferay.portal.kernel.exception.SystemException,
159                            com.liferay.portlet.social.NoSuchEquityHistoryException {
160                    return getPersistence().remove(equityHistoryId);
161            }
162    
163            public static com.liferay.portlet.social.model.SocialEquityHistory updateImpl(
164                    com.liferay.portlet.social.model.SocialEquityHistory socialEquityHistory,
165                    boolean merge)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getPersistence().updateImpl(socialEquityHistory, merge);
168            }
169    
170            /**
171            * Finds the social equity history with the primary key or throws a {@link com.liferay.portlet.social.NoSuchEquityHistoryException} if it could not be found.
172            *
173            * @param equityHistoryId the primary key of the social equity history to find
174            * @return the social equity history
175            * @throws com.liferay.portlet.social.NoSuchEquityHistoryException if a social equity history with the primary key could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portlet.social.model.SocialEquityHistory findByPrimaryKey(
179                    long equityHistoryId)
180                    throws com.liferay.portal.kernel.exception.SystemException,
181                            com.liferay.portlet.social.NoSuchEquityHistoryException {
182                    return getPersistence().findByPrimaryKey(equityHistoryId);
183            }
184    
185            /**
186            * Finds the social equity history with the primary key or returns <code>null</code> if it could not be found.
187            *
188            * @param equityHistoryId the primary key of the social equity history to find
189            * @return the social equity history, or <code>null</code> if a social equity history with the primary key could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portlet.social.model.SocialEquityHistory fetchByPrimaryKey(
193                    long equityHistoryId)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().fetchByPrimaryKey(equityHistoryId);
196            }
197    
198            /**
199            * Finds all the social equity histories.
200            *
201            * @return the social equity histories
202            * @throws SystemException if a system exception occurred
203            */
204            public static java.util.List<com.liferay.portlet.social.model.SocialEquityHistory> findAll()
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getPersistence().findAll();
207            }
208    
209            /**
210            * Finds a range of all the social equity histories.
211            *
212            * <p>
213            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
214            * </p>
215            *
216            * @param start the lower bound of the range of social equity histories to return
217            * @param end the upper bound of the range of social equity histories to return (not inclusive)
218            * @return the range of social equity histories
219            * @throws SystemException if a system exception occurred
220            */
221            public static java.util.List<com.liferay.portlet.social.model.SocialEquityHistory> findAll(
222                    int start, int end)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().findAll(start, end);
225            }
226    
227            /**
228            * Finds an ordered range of all the social equity histories.
229            *
230            * <p>
231            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
232            * </p>
233            *
234            * @param start the lower bound of the range of social equity histories to return
235            * @param end the upper bound of the range of social equity histories to return (not inclusive)
236            * @param orderByComparator the comparator to order the results by
237            * @return the ordered range of social equity histories
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portlet.social.model.SocialEquityHistory> findAll(
241                    int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence().findAll(start, end, orderByComparator);
245            }
246    
247            /**
248            * Removes all the social equity histories from the database.
249            *
250            * @throws SystemException if a system exception occurred
251            */
252            public static void removeAll()
253                    throws com.liferay.portal.kernel.exception.SystemException {
254                    getPersistence().removeAll();
255            }
256    
257            /**
258            * Counts all the social equity histories.
259            *
260            * @return the number of social equity histories
261            * @throws SystemException if a system exception occurred
262            */
263            public static int countAll()
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence().countAll();
266            }
267    
268            public static SocialEquityHistoryPersistence getPersistence() {
269                    if (_persistence == null) {
270                            _persistence = (SocialEquityHistoryPersistence)PortalBeanLocatorUtil.locate(SocialEquityHistoryPersistence.class.getName());
271                    }
272    
273                    return _persistence;
274            }
275    
276            public void setPersistence(SocialEquityHistoryPersistence persistence) {
277                    _persistence = persistence;
278            }
279    
280            private static SocialEquityHistoryPersistence _persistence;
281    }