001    /**
002     * Copyright (c) 2000-present 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.expando.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for ExpandoRow. This utility wraps
024     * {@link com.liferay.portlet.expando.service.impl.ExpandoRowLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ExpandoRowLocalService
032     * @see com.liferay.portlet.expando.service.base.ExpandoRowLocalServiceBaseImpl
033     * @see com.liferay.portlet.expando.service.impl.ExpandoRowLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ExpandoRowLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoRowLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the expando row to the database. Also notifies the appropriate model listeners.
046            *
047            * @param expandoRow the expando row
048            * @return the expando row that was added
049            */
050            public static com.liferay.portlet.expando.model.ExpandoRow addExpandoRow(
051                    com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
052                    return getService().addExpandoRow(expandoRow);
053            }
054    
055            public static com.liferay.portlet.expando.model.ExpandoRow addRow(
056                    long tableId, long classPK)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    return getService().addRow(tableId, classPK);
059            }
060    
061            /**
062            * Creates a new expando row with the primary key. Does not add the expando row to the database.
063            *
064            * @param rowId the primary key for the new expando row
065            * @return the new expando row
066            */
067            public static com.liferay.portlet.expando.model.ExpandoRow createExpandoRow(
068                    long rowId) {
069                    return getService().createExpandoRow(rowId);
070            }
071    
072            /**
073            * Deletes the expando row from the database. Also notifies the appropriate model listeners.
074            *
075            * @param expandoRow the expando row
076            * @return the expando row that was removed
077            */
078            public static com.liferay.portlet.expando.model.ExpandoRow deleteExpandoRow(
079                    com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
080                    return getService().deleteExpandoRow(expandoRow);
081            }
082    
083            /**
084            * Deletes the expando row with the primary key from the database. Also notifies the appropriate model listeners.
085            *
086            * @param rowId the primary key of the expando row
087            * @return the expando row that was removed
088            * @throws PortalException if a expando row with the primary key could not be found
089            */
090            public static com.liferay.portlet.expando.model.ExpandoRow deleteExpandoRow(
091                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
092                    return getService().deleteExpandoRow(rowId);
093            }
094    
095            /**
096            * @throws PortalException
097            */
098            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
099                    com.liferay.portal.model.PersistedModel persistedModel)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    return getService().deletePersistedModel(persistedModel);
102            }
103    
104            public static void deleteRow(long companyId, java.lang.String className,
105                    java.lang.String tableName, long classPK)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    getService().deleteRow(companyId, className, tableName, classPK);
108            }
109    
110            public static void deleteRow(long companyId, long classNameId,
111                    java.lang.String tableName, long classPK)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    getService().deleteRow(companyId, classNameId, tableName, classPK);
114            }
115    
116            public static void deleteRow(
117                    com.liferay.portlet.expando.model.ExpandoRow row) {
118                    getService().deleteRow(row);
119            }
120    
121            public static void deleteRow(long rowId)
122                    throws com.liferay.portal.kernel.exception.PortalException {
123                    getService().deleteRow(rowId);
124            }
125    
126            public static void deleteRow(long tableId, long classPK)
127                    throws com.liferay.portal.kernel.exception.PortalException {
128                    getService().deleteRow(tableId, classPK);
129            }
130    
131            public static void deleteRows(long classPK) {
132                    getService().deleteRows(classPK);
133            }
134    
135            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
136                    return getService().dynamicQuery();
137            }
138    
139            /**
140            * Performs a dynamic query on the database and returns the matching rows.
141            *
142            * @param dynamicQuery the dynamic query
143            * @return the matching rows
144            */
145            public static <T> java.util.List<T> dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
147                    return getService().dynamicQuery(dynamicQuery);
148            }
149    
150            /**
151            * Performs a dynamic query on the database and returns a range of the matching rows.
152            *
153            * <p>
154            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @return the range of matching rows
161            */
162            public static <T> java.util.List<T> dynamicQuery(
163                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
164                    int end) {
165                    return getService().dynamicQuery(dynamicQuery, start, end);
166            }
167    
168            /**
169            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
170            *
171            * <p>
172            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
173            * </p>
174            *
175            * @param dynamicQuery the dynamic query
176            * @param start the lower bound of the range of model instances
177            * @param end the upper bound of the range of model instances (not inclusive)
178            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
179            * @return the ordered range of matching rows
180            */
181            public static <T> java.util.List<T> dynamicQuery(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
183                    int end,
184                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
185                    return getService()
186                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
187            }
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @return the number of rows matching the dynamic query
194            */
195            public static long dynamicQueryCount(
196                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
197                    return getService().dynamicQueryCount(dynamicQuery);
198            }
199    
200            /**
201            * Returns the number of rows matching the dynamic query.
202            *
203            * @param dynamicQuery the dynamic query
204            * @param projection the projection to apply to the query
205            * @return the number of rows matching the dynamic query
206            */
207            public static long dynamicQueryCount(
208                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
209                    com.liferay.portal.kernel.dao.orm.Projection projection) {
210                    return getService().dynamicQueryCount(dynamicQuery, projection);
211            }
212    
213            public static com.liferay.portlet.expando.model.ExpandoRow fetchExpandoRow(
214                    long rowId) {
215                    return getService().fetchExpandoRow(rowId);
216            }
217    
218            public static com.liferay.portlet.expando.model.ExpandoRow fetchRow(
219                    long tableId, long classPK) {
220                    return getService().fetchRow(tableId, classPK);
221            }
222    
223            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
224                    return getService().getActionableDynamicQuery();
225            }
226    
227            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows(
228                    long companyId, java.lang.String className, int start, int end) {
229                    return getService().getDefaultTableRows(companyId, className, start, end);
230            }
231    
232            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows(
233                    long companyId, long classNameId, int start, int end) {
234                    return getService()
235                                       .getDefaultTableRows(companyId, classNameId, start, end);
236            }
237    
238            public static int getDefaultTableRowsCount(long companyId,
239                    java.lang.String className) {
240                    return getService().getDefaultTableRowsCount(companyId, className);
241            }
242    
243            public static int getDefaultTableRowsCount(long companyId, long classNameId) {
244                    return getService().getDefaultTableRowsCount(companyId, classNameId);
245            }
246    
247            /**
248            * Returns the expando row with the primary key.
249            *
250            * @param rowId the primary key of the expando row
251            * @return the expando row
252            * @throws PortalException if a expando row with the primary key could not be found
253            */
254            public static com.liferay.portlet.expando.model.ExpandoRow getExpandoRow(
255                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().getExpandoRow(rowId);
257            }
258    
259            /**
260            * Returns a range of all the expando rows.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
264            * </p>
265            *
266            * @param start the lower bound of the range of expando rows
267            * @param end the upper bound of the range of expando rows (not inclusive)
268            * @return the range of expando rows
269            */
270            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getExpandoRows(
271                    int start, int end) {
272                    return getService().getExpandoRows(start, end);
273            }
274    
275            /**
276            * Returns the number of expando rows.
277            *
278            * @return the number of expando rows
279            */
280            public static int getExpandoRowsCount() {
281                    return getService().getExpandoRowsCount();
282            }
283    
284            /**
285            * Returns the OSGi service identifier.
286            *
287            * @return the OSGi service identifier
288            */
289            public static java.lang.String getOSGiServiceIdentifier() {
290                    return getService().getOSGiServiceIdentifier();
291            }
292    
293            public static com.liferay.portal.model.PersistedModel getPersistedModel(
294                    java.io.Serializable primaryKeyObj)
295                    throws com.liferay.portal.kernel.exception.PortalException {
296                    return getService().getPersistedModel(primaryKeyObj);
297            }
298    
299            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
300                    long companyId, java.lang.String className, java.lang.String tableName,
301                    long classPK) {
302                    return getService().getRow(companyId, className, tableName, classPK);
303            }
304    
305            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
306                    long companyId, long classNameId, java.lang.String tableName,
307                    long classPK) {
308                    return getService().getRow(companyId, classNameId, tableName, classPK);
309            }
310    
311            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
312                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
313                    return getService().getRow(rowId);
314            }
315    
316            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
317                    long tableId, long classPK)
318                    throws com.liferay.portal.kernel.exception.PortalException {
319                    return getService().getRow(tableId, classPK);
320            }
321    
322            /**
323            * @deprecated As of 6.1.0, replaced by {@link #getRows(long, String,
324            String, int, int)}
325            */
326            @Deprecated
327            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
328                    java.lang.String className, java.lang.String tableName, int start,
329                    int end) {
330                    return getService().getRows(className, tableName, start, end);
331            }
332    
333            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
334                    long companyId, java.lang.String className, java.lang.String tableName,
335                    int start, int end) {
336                    return getService().getRows(companyId, className, tableName, start, end);
337            }
338    
339            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
340                    long companyId, long classNameId, java.lang.String tableName,
341                    int start, int end) {
342                    return getService()
343                                       .getRows(companyId, classNameId, tableName, start, end);
344            }
345    
346            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
347                    long tableId, int start, int end) {
348                    return getService().getRows(tableId, start, end);
349            }
350    
351            /**
352            * @deprecated As of 6.1.0, replaced by {@link #getRowsCount(long, String,
353            String)}
354            */
355            @Deprecated
356            public static int getRowsCount(java.lang.String className,
357                    java.lang.String tableName) {
358                    return getService().getRowsCount(className, tableName);
359            }
360    
361            public static int getRowsCount(long companyId, java.lang.String className,
362                    java.lang.String tableName) {
363                    return getService().getRowsCount(companyId, className, tableName);
364            }
365    
366            public static int getRowsCount(long companyId, long classNameId,
367                    java.lang.String tableName) {
368                    return getService().getRowsCount(companyId, classNameId, tableName);
369            }
370    
371            public static int getRowsCount(long tableId) {
372                    return getService().getRowsCount(tableId);
373            }
374    
375            /**
376            * Updates the expando row in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
377            *
378            * @param expandoRow the expando row
379            * @return the expando row that was updated
380            */
381            public static com.liferay.portlet.expando.model.ExpandoRow updateExpandoRow(
382                    com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
383                    return getService().updateExpandoRow(expandoRow);
384            }
385    
386            public static ExpandoRowLocalService getService() {
387                    if (_service == null) {
388                            _service = (ExpandoRowLocalService)PortalBeanLocatorUtil.locate(ExpandoRowLocalService.class.getName());
389    
390                            ReferenceRegistry.registerReference(ExpandoRowLocalServiceUtil.class,
391                                    "_service");
392                    }
393    
394                    return _service;
395            }
396    
397            /**
398             * @deprecated As of 6.2.0
399             */
400            @Deprecated
401            public void setService(ExpandoRowLocalService service) {
402            }
403    
404            private static ExpandoRowLocalService _service;
405    }