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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
285                    return getService().getIndexableActionableDynamicQuery();
286            }
287    
288            /**
289            * Returns the OSGi service identifier.
290            *
291            * @return the OSGi service identifier
292            */
293            public static java.lang.String getOSGiServiceIdentifier() {
294                    return getService().getOSGiServiceIdentifier();
295            }
296    
297            public static com.liferay.portal.model.PersistedModel getPersistedModel(
298                    java.io.Serializable primaryKeyObj)
299                    throws com.liferay.portal.kernel.exception.PortalException {
300                    return getService().getPersistedModel(primaryKeyObj);
301            }
302    
303            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
304                    long companyId, java.lang.String className, java.lang.String tableName,
305                    long classPK) {
306                    return getService().getRow(companyId, className, tableName, classPK);
307            }
308    
309            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
310                    long companyId, long classNameId, java.lang.String tableName,
311                    long classPK) {
312                    return getService().getRow(companyId, classNameId, tableName, classPK);
313            }
314    
315            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
316                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
317                    return getService().getRow(rowId);
318            }
319    
320            public static com.liferay.portlet.expando.model.ExpandoRow getRow(
321                    long tableId, long classPK)
322                    throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService().getRow(tableId, classPK);
324            }
325    
326            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
327                    long companyId, java.lang.String className, java.lang.String tableName,
328                    int start, int end) {
329                    return getService().getRows(companyId, className, tableName, start, end);
330            }
331    
332            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
333                    long companyId, long classNameId, java.lang.String tableName,
334                    int start, int end) {
335                    return getService()
336                                       .getRows(companyId, classNameId, tableName, start, end);
337            }
338    
339            public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> getRows(
340                    long tableId, int start, int end) {
341                    return getService().getRows(tableId, start, end);
342            }
343    
344            public static int getRowsCount(long companyId, java.lang.String className,
345                    java.lang.String tableName) {
346                    return getService().getRowsCount(companyId, className, tableName);
347            }
348    
349            public static int getRowsCount(long companyId, long classNameId,
350                    java.lang.String tableName) {
351                    return getService().getRowsCount(companyId, classNameId, tableName);
352            }
353    
354            public static int getRowsCount(long tableId) {
355                    return getService().getRowsCount(tableId);
356            }
357    
358            /**
359            * Updates the expando row in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
360            *
361            * @param expandoRow the expando row
362            * @return the expando row that was updated
363            */
364            public static com.liferay.portlet.expando.model.ExpandoRow updateExpandoRow(
365                    com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
366                    return getService().updateExpandoRow(expandoRow);
367            }
368    
369            public static ExpandoRowLocalService getService() {
370                    if (_service == null) {
371                            _service = (ExpandoRowLocalService)PortalBeanLocatorUtil.locate(ExpandoRowLocalService.class.getName());
372    
373                            ReferenceRegistry.registerReference(ExpandoRowLocalServiceUtil.class,
374                                    "_service");
375                    }
376    
377                    return _service;
378            }
379    
380            private static ExpandoRowLocalService _service;
381    }