001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.social.model.SocialEquityAssetEntry;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the social equity asset entry service. This utility wraps {@link SocialEquityAssetEntryPersistenceImpl} 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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see SocialEquityAssetEntryPersistence
037     * @see SocialEquityAssetEntryPersistenceImpl
038     * @generated
039     */
040    public class SocialEquityAssetEntryUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(SocialEquityAssetEntry socialEquityAssetEntry) {
058                    getPersistence().clearCache(socialEquityAssetEntry);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<SocialEquityAssetEntry> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<SocialEquityAssetEntry> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<SocialEquityAssetEntry> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static SocialEquityAssetEntry remove(
101                    SocialEquityAssetEntry socialEquityAssetEntry)
102                    throws SystemException {
103                    return getPersistence().remove(socialEquityAssetEntry);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
108             */
109            public static SocialEquityAssetEntry update(
110                    SocialEquityAssetEntry socialEquityAssetEntry, boolean merge)
111                    throws SystemException {
112                    return getPersistence().update(socialEquityAssetEntry, merge);
113            }
114    
115            /**
116             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
117             */
118            public static SocialEquityAssetEntry update(
119                    SocialEquityAssetEntry socialEquityAssetEntry, boolean merge,
120                    ServiceContext serviceContext) throws SystemException {
121                    return getPersistence()
122                                       .update(socialEquityAssetEntry, merge, serviceContext);
123            }
124    
125            /**
126            * Caches the social equity asset entry in the entity cache if it is enabled.
127            *
128            * @param socialEquityAssetEntry the social equity asset entry to cache
129            */
130            public static void cacheResult(
131                    com.liferay.portlet.social.model.SocialEquityAssetEntry socialEquityAssetEntry) {
132                    getPersistence().cacheResult(socialEquityAssetEntry);
133            }
134    
135            /**
136            * Caches the social equity asset entries in the entity cache if it is enabled.
137            *
138            * @param socialEquityAssetEntries the social equity asset entries to cache
139            */
140            public static void cacheResult(
141                    java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> socialEquityAssetEntries) {
142                    getPersistence().cacheResult(socialEquityAssetEntries);
143            }
144    
145            /**
146            * Creates a new social equity asset entry with the primary key. Does not add the social equity asset entry to the database.
147            *
148            * @param equityAssetEntryId the primary key for the new social equity asset entry
149            * @return the new social equity asset entry
150            */
151            public static com.liferay.portlet.social.model.SocialEquityAssetEntry create(
152                    long equityAssetEntryId) {
153                    return getPersistence().create(equityAssetEntryId);
154            }
155    
156            /**
157            * Removes the social equity asset entry with the primary key from the database. Also notifies the appropriate model listeners.
158            *
159            * @param equityAssetEntryId the primary key of the social equity asset entry to remove
160            * @return the social equity asset entry that was removed
161            * @throws com.liferay.portlet.social.NoSuchEquityAssetEntryException if a social equity asset entry with the primary key could not be found
162            * @throws SystemException if a system exception occurred
163            */
164            public static com.liferay.portlet.social.model.SocialEquityAssetEntry remove(
165                    long equityAssetEntryId)
166                    throws com.liferay.portal.kernel.exception.SystemException,
167                            com.liferay.portlet.social.NoSuchEquityAssetEntryException {
168                    return getPersistence().remove(equityAssetEntryId);
169            }
170    
171            public static com.liferay.portlet.social.model.SocialEquityAssetEntry updateImpl(
172                    com.liferay.portlet.social.model.SocialEquityAssetEntry socialEquityAssetEntry,
173                    boolean merge)
174                    throws com.liferay.portal.kernel.exception.SystemException {
175                    return getPersistence().updateImpl(socialEquityAssetEntry, merge);
176            }
177    
178            /**
179            * Finds the social equity asset entry with the primary key or throws a {@link com.liferay.portlet.social.NoSuchEquityAssetEntryException} if it could not be found.
180            *
181            * @param equityAssetEntryId the primary key of the social equity asset entry to find
182            * @return the social equity asset entry
183            * @throws com.liferay.portlet.social.NoSuchEquityAssetEntryException if a social equity asset entry with the primary key could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public static com.liferay.portlet.social.model.SocialEquityAssetEntry findByPrimaryKey(
187                    long equityAssetEntryId)
188                    throws com.liferay.portal.kernel.exception.SystemException,
189                            com.liferay.portlet.social.NoSuchEquityAssetEntryException {
190                    return getPersistence().findByPrimaryKey(equityAssetEntryId);
191            }
192    
193            /**
194            * Finds the social equity asset entry with the primary key or returns <code>null</code> if it could not be found.
195            *
196            * @param equityAssetEntryId the primary key of the social equity asset entry to find
197            * @return the social equity asset entry, or <code>null</code> if a social equity asset entry with the primary key could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public static com.liferay.portlet.social.model.SocialEquityAssetEntry fetchByPrimaryKey(
201                    long equityAssetEntryId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().fetchByPrimaryKey(equityAssetEntryId);
204            }
205    
206            /**
207            * Finds the social equity asset entry where assetEntryId = &#63; or throws a {@link com.liferay.portlet.social.NoSuchEquityAssetEntryException} if it could not be found.
208            *
209            * @param assetEntryId the asset entry ID to search with
210            * @return the matching social equity asset entry
211            * @throws com.liferay.portlet.social.NoSuchEquityAssetEntryException if a matching social equity asset entry could not be found
212            * @throws SystemException if a system exception occurred
213            */
214            public static com.liferay.portlet.social.model.SocialEquityAssetEntry findByAssetEntryId(
215                    long assetEntryId)
216                    throws com.liferay.portal.kernel.exception.SystemException,
217                            com.liferay.portlet.social.NoSuchEquityAssetEntryException {
218                    return getPersistence().findByAssetEntryId(assetEntryId);
219            }
220    
221            /**
222            * Finds the social equity asset entry where assetEntryId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
223            *
224            * @param assetEntryId the asset entry ID to search with
225            * @return the matching social equity asset entry, or <code>null</code> if a matching social equity asset entry could not be found
226            * @throws SystemException if a system exception occurred
227            */
228            public static com.liferay.portlet.social.model.SocialEquityAssetEntry fetchByAssetEntryId(
229                    long assetEntryId)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().fetchByAssetEntryId(assetEntryId);
232            }
233    
234            /**
235            * Finds the social equity asset entry where assetEntryId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
236            *
237            * @param assetEntryId the asset entry ID to search with
238            * @return the matching social equity asset entry, or <code>null</code> if a matching social equity asset entry could not be found
239            * @throws SystemException if a system exception occurred
240            */
241            public static com.liferay.portlet.social.model.SocialEquityAssetEntry fetchByAssetEntryId(
242                    long assetEntryId, boolean retrieveFromCache)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .fetchByAssetEntryId(assetEntryId, retrieveFromCache);
246            }
247    
248            /**
249            * Finds all the social equity asset entries.
250            *
251            * @return the social equity asset entries
252            * @throws SystemException if a system exception occurred
253            */
254            public static java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> findAll()
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    return getPersistence().findAll();
257            }
258    
259            /**
260            * Finds a range of all the social equity asset entries.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param start the lower bound of the range of social equity asset entries to return
267            * @param end the upper bound of the range of social equity asset entries to return (not inclusive)
268            * @return the range of social equity asset entries
269            * @throws SystemException if a system exception occurred
270            */
271            public static java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> findAll(
272                    int start, int end)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return getPersistence().findAll(start, end);
275            }
276    
277            /**
278            * Finds an ordered range of all the social equity asset entries.
279            *
280            * <p>
281            * 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.
282            * </p>
283            *
284            * @param start the lower bound of the range of social equity asset entries to return
285            * @param end the upper bound of the range of social equity asset entries to return (not inclusive)
286            * @param orderByComparator the comparator to order the results by
287            * @return the ordered range of social equity asset entries
288            * @throws SystemException if a system exception occurred
289            */
290            public static java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> findAll(
291                    int start, int end,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    return getPersistence().findAll(start, end, orderByComparator);
295            }
296    
297            /**
298            * Removes the social equity asset entry where assetEntryId = &#63; from the database.
299            *
300            * @param assetEntryId the asset entry ID to search with
301            * @throws SystemException if a system exception occurred
302            */
303            public static void removeByAssetEntryId(long assetEntryId)
304                    throws com.liferay.portal.kernel.exception.SystemException,
305                            com.liferay.portlet.social.NoSuchEquityAssetEntryException {
306                    getPersistence().removeByAssetEntryId(assetEntryId);
307            }
308    
309            /**
310            * Removes all the social equity asset entries from the database.
311            *
312            * @throws SystemException if a system exception occurred
313            */
314            public static void removeAll()
315                    throws com.liferay.portal.kernel.exception.SystemException {
316                    getPersistence().removeAll();
317            }
318    
319            /**
320            * Counts all the social equity asset entries where assetEntryId = &#63;.
321            *
322            * @param assetEntryId the asset entry ID to search with
323            * @return the number of matching social equity asset entries
324            * @throws SystemException if a system exception occurred
325            */
326            public static int countByAssetEntryId(long assetEntryId)
327                    throws com.liferay.portal.kernel.exception.SystemException {
328                    return getPersistence().countByAssetEntryId(assetEntryId);
329            }
330    
331            /**
332            * Counts all the social equity asset entries.
333            *
334            * @return the number of social equity asset entries
335            * @throws SystemException if a system exception occurred
336            */
337            public static int countAll()
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getPersistence().countAll();
340            }
341    
342            public static SocialEquityAssetEntryPersistence getPersistence() {
343                    if (_persistence == null) {
344                            _persistence = (SocialEquityAssetEntryPersistence)PortalBeanLocatorUtil.locate(SocialEquityAssetEntryPersistence.class.getName());
345    
346                            ReferenceRegistry.registerReference(SocialEquityAssetEntryUtil.class,
347                                    "_persistence");
348                    }
349    
350                    return _persistence;
351            }
352    
353            public void setPersistence(SocialEquityAssetEntryPersistence persistence) {
354                    _persistence = persistence;
355    
356                    ReferenceRegistry.registerReference(SocialEquityAssetEntryUtil.class,
357                            "_persistence");
358            }
359    
360            private static SocialEquityAssetEntryPersistence _persistence;
361    }