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