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.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
219                    return getService().getActionableDynamicQuery();
220            }
221    
222            /**
223            * Returns the Spring bean ID for this bean.
224            *
225            * @return the Spring bean ID for this bean
226            */
227            public static java.lang.String getBeanIdentifier() {
228                    return getService().getBeanIdentifier();
229            }
230    
231            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows(
232                    long companyId, java.lang.String className, int start, int end) {
233                    return getService().getDefaultTableRows(companyId, className, start, end);
234            }
235    
236            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getDefaultTableRows(
237                    long companyId, long classNameId, int start, int end) {
238                    return getService()
239                                       .getDefaultTableRows(companyId, classNameId, start, end);
240            }
241    
242            public static int getDefaultTableRowsCount(long companyId,
243                    java.lang.String className) {
244                    return getService().getDefaultTableRowsCount(companyId, className);
245            }
246    
247            public static int getDefaultTableRowsCount(long companyId, long classNameId) {
248                    return getService().getDefaultTableRowsCount(companyId, classNameId);
249            }
250    
251            /**
252            * Returns the expando row with the primary key.
253            *
254            * @param rowId the primary key of the expando row
255            * @return the expando row
256            * @throws PortalException if a expando row with the primary key could not be found
257            */
258            public static com.liferay.portlet.expando.model.ExpandoRow getExpandoRow(
259                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
260                    return getService().getExpandoRow(rowId);
261            }
262    
263            /**
264            * Returns a range of all the expando rows.
265            *
266            * <p>
267            * 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.
268            * </p>
269            *
270            * @param start the lower bound of the range of expando rows
271            * @param end the upper bound of the range of expando rows (not inclusive)
272            * @return the range of expando rows
273            */
274            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getExpandoRows(
275                    int start, int end) {
276                    return getService().getExpandoRows(start, end);
277            }
278    
279            /**
280            * Returns the number of expando rows.
281            *
282            * @return the number of expando rows
283            */
284            public static int getExpandoRowsCount() {
285                    return getService().getExpandoRowsCount();
286            }
287    
288            public static com.liferay.portal.model.PersistedModel getPersistedModel(
289                    java.io.Serializable primaryKeyObj)
290                    throws com.liferay.portal.kernel.exception.PortalException {
291                    return getService().getPersistedModel(primaryKeyObj);
292            }
293    
294            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
295                    long companyId, java.lang.String className, java.lang.String tableName,
296                    long classPK) {
297                    return getService().getRow(companyId, className, tableName, classPK);
298            }
299    
300            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
301                    long companyId, long classNameId, java.lang.String tableName,
302                    long classPK) {
303                    return getService().getRow(companyId, classNameId, tableName, classPK);
304            }
305    
306            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
307                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
308                    return getService().getRow(rowId);
309            }
310    
311            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
312                    long tableId, long classPK)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    return getService().getRow(tableId, classPK);
315            }
316    
317            /**
318            * @deprecated As of 6.1.0, replaced by {@link #getRows(long, String,
319            String, int, int)}
320            */
321            @Deprecated
322            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
323                    java.lang.String className, java.lang.String tableName, int start,
324                    int end) {
325                    return getService().getRows(className, tableName, start, end);
326            }
327    
328            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
329                    long companyId, java.lang.String className, java.lang.String tableName,
330                    int start, int end) {
331                    return getService().getRows(companyId, className, tableName, start, end);
332            }
333    
334            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
335                    long companyId, long classNameId, java.lang.String tableName,
336                    int start, int end) {
337                    return getService()
338                                       .getRows(companyId, classNameId, tableName, start, end);
339            }
340    
341            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
342                    long tableId, int start, int end) {
343                    return getService().getRows(tableId, start, end);
344            }
345    
346            /**
347            * @deprecated As of 6.1.0, replaced by {@link #getRowsCount(long, String,
348            String)}
349            */
350            @Deprecated
351            public static int getRowsCount(java.lang.String className,
352                    java.lang.String tableName) {
353                    return getService().getRowsCount(className, tableName);
354            }
355    
356            public static int getRowsCount(long companyId, java.lang.String className,
357                    java.lang.String tableName) {
358                    return getService().getRowsCount(companyId, className, tableName);
359            }
360    
361            public static int getRowsCount(long companyId, long classNameId,
362                    java.lang.String tableName) {
363                    return getService().getRowsCount(companyId, classNameId, tableName);
364            }
365    
366            public static int getRowsCount(long tableId) {
367                    return getService().getRowsCount(tableId);
368            }
369    
370            /**
371            * Sets the Spring bean ID for this bean.
372            *
373            * @param beanIdentifier the Spring bean ID for this bean
374            */
375            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
376                    getService().setBeanIdentifier(beanIdentifier);
377            }
378    
379            /**
380            * Updates the expando row in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
381            *
382            * @param expandoRow the expando row
383            * @return the expando row that was updated
384            */
385            public static com.liferay.portlet.expando.model.ExpandoRow updateExpandoRow(
386                    com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
387                    return getService().updateExpandoRow(expandoRow);
388            }
389    
390            public static ExpandoRowLocalService getService() {
391                    if (_service == null) {
392                            _service = (ExpandoRowLocalService)PortalBeanLocatorUtil.locate(ExpandoRowLocalService.class.getName());
393    
394                            ReferenceRegistry.registerReference(ExpandoRowLocalServiceUtil.class,
395                                    "_service");
396                    }
397    
398                    return _service;
399            }
400    
401            /**
402             * @deprecated As of 6.2.0
403             */
404            @Deprecated
405            public void setService(ExpandoRowLocalService service) {
406            }
407    
408            private static ExpandoRowLocalService _service;
409    }