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.expando.kernel.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.expando.kernel.model.ExpandoRow addExpandoRow(
051                    com.liferay.expando.kernel.model.ExpandoRow expandoRow) {
052                    return getService().addExpandoRow(expandoRow);
053            }
054    
055            public static com.liferay.expando.kernel.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.expando.kernel.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.expando.kernel.model.ExpandoRow deleteExpandoRow(
079                    com.liferay.expando.kernel.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.expando.kernel.model.ExpandoRow deleteExpandoRow(
091                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
092                    return getService().deleteExpandoRow(rowId);
093            }
094    
095            public static com.liferay.expando.kernel.model.ExpandoRow fetchExpandoRow(
096                    long rowId) {
097                    return getService().fetchExpandoRow(rowId);
098            }
099    
100            public static com.liferay.expando.kernel.model.ExpandoRow fetchRow(
101                    long tableId, long classPK) {
102                    return getService().fetchRow(tableId, classPK);
103            }
104    
105            /**
106            * Returns the expando row with the primary key.
107            *
108            * @param rowId the primary key of the expando row
109            * @return the expando row
110            * @throws PortalException if a expando row with the primary key could not be found
111            */
112            public static com.liferay.expando.kernel.model.ExpandoRow getExpandoRow(
113                    long rowId) throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService().getExpandoRow(rowId);
115            }
116    
117            public static com.liferay.expando.kernel.model.ExpandoRow getRow(
118                    long companyId, java.lang.String className, java.lang.String tableName,
119                    long classPK) {
120                    return getService().getRow(companyId, className, tableName, classPK);
121            }
122    
123            public static com.liferay.expando.kernel.model.ExpandoRow getRow(
124                    long companyId, long classNameId, java.lang.String tableName,
125                    long classPK) {
126                    return getService().getRow(companyId, classNameId, tableName, classPK);
127            }
128    
129            public static com.liferay.expando.kernel.model.ExpandoRow getRow(long rowId)
130                    throws com.liferay.portal.kernel.exception.PortalException {
131                    return getService().getRow(rowId);
132            }
133    
134            public static com.liferay.expando.kernel.model.ExpandoRow getRow(
135                    long tableId, long classPK)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    return getService().getRow(tableId, classPK);
138            }
139    
140            /**
141            * Updates the expando row in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
142            *
143            * @param expandoRow the expando row
144            * @return the expando row that was updated
145            */
146            public static com.liferay.expando.kernel.model.ExpandoRow updateExpandoRow(
147                    com.liferay.expando.kernel.model.ExpandoRow expandoRow) {
148                    return getService().updateExpandoRow(expandoRow);
149            }
150    
151            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
152                    return getService().getActionableDynamicQuery();
153            }
154    
155            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
156                    return getService().dynamicQuery();
157            }
158    
159            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
160                    return getService().getIndexableActionableDynamicQuery();
161            }
162    
163            /**
164            * @throws PortalException
165            */
166            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
167                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
168                    throws com.liferay.portal.kernel.exception.PortalException {
169                    return getService().deletePersistedModel(persistedModel);
170            }
171    
172            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException {
175                    return getService().getPersistedModel(primaryKeyObj);
176            }
177    
178            public static int getDefaultTableRowsCount(long companyId,
179                    java.lang.String className) {
180                    return getService().getDefaultTableRowsCount(companyId, className);
181            }
182    
183            public static int getDefaultTableRowsCount(long companyId, long classNameId) {
184                    return getService().getDefaultTableRowsCount(companyId, classNameId);
185            }
186    
187            /**
188            * Returns the number of expando rows.
189            *
190            * @return the number of expando rows
191            */
192            public static int getExpandoRowsCount() {
193                    return getService().getExpandoRowsCount();
194            }
195    
196            public static int getRowsCount(long companyId, java.lang.String className,
197                    java.lang.String tableName) {
198                    return getService().getRowsCount(companyId, className, tableName);
199            }
200    
201            public static int getRowsCount(long companyId, long classNameId,
202                    java.lang.String tableName) {
203                    return getService().getRowsCount(companyId, classNameId, tableName);
204            }
205    
206            public static int getRowsCount(long tableId) {
207                    return getService().getRowsCount(tableId);
208            }
209    
210            /**
211            * Returns the OSGi service identifier.
212            *
213            * @return the OSGi service identifier
214            */
215            public static java.lang.String getOSGiServiceIdentifier() {
216                    return getService().getOSGiServiceIdentifier();
217            }
218    
219            /**
220            * Performs a dynamic query on the database and returns the matching rows.
221            *
222            * @param dynamicQuery the dynamic query
223            * @return the matching rows
224            */
225            public static <T> java.util.List<T> dynamicQuery(
226                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
227                    return getService().dynamicQuery(dynamicQuery);
228            }
229    
230            /**
231            * Performs a dynamic query on the database and returns a range of the matching rows.
232            *
233            * <p>
234            * 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.
235            * </p>
236            *
237            * @param dynamicQuery the dynamic query
238            * @param start the lower bound of the range of model instances
239            * @param end the upper bound of the range of model instances (not inclusive)
240            * @return the range of matching rows
241            */
242            public static <T> java.util.List<T> dynamicQuery(
243                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
244                    int end) {
245                    return getService().dynamicQuery(dynamicQuery, start, end);
246            }
247    
248            /**
249            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
250            *
251            * <p>
252            * 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.
253            * </p>
254            *
255            * @param dynamicQuery the dynamic query
256            * @param start the lower bound of the range of model instances
257            * @param end the upper bound of the range of model instances (not inclusive)
258            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
259            * @return the ordered range of matching rows
260            */
261            public static <T> java.util.List<T> dynamicQuery(
262                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
263                    int end,
264                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
265                    return getService()
266                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
267            }
268    
269            public static java.util.List<com.liferay.expando.kernel.model.ExpandoRow> getDefaultTableRows(
270                    long companyId, java.lang.String className, int start, int end) {
271                    return getService().getDefaultTableRows(companyId, className, start, end);
272            }
273    
274            public static java.util.List<com.liferay.expando.kernel.model.ExpandoRow> getDefaultTableRows(
275                    long companyId, long classNameId, int start, int end) {
276                    return getService()
277                                       .getDefaultTableRows(companyId, classNameId, start, end);
278            }
279    
280            /**
281            * Returns a range of all the expando rows.
282            *
283            * <p>
284            * 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.
285            * </p>
286            *
287            * @param start the lower bound of the range of expando rows
288            * @param end the upper bound of the range of expando rows (not inclusive)
289            * @return the range of expando rows
290            */
291            public static java.util.List<com.liferay.expando.kernel.model.ExpandoRow> getExpandoRows(
292                    int start, int end) {
293                    return getService().getExpandoRows(start, end);
294            }
295    
296            public static java.util.List<com.liferay.expando.kernel.model.ExpandoRow> getRows(
297                    long companyId, java.lang.String className, java.lang.String tableName,
298                    int start, int end) {
299                    return getService().getRows(companyId, className, tableName, start, end);
300            }
301    
302            public static java.util.List<com.liferay.expando.kernel.model.ExpandoRow> getRows(
303                    long companyId, long classNameId, java.lang.String tableName,
304                    int start, int end) {
305                    return getService()
306                                       .getRows(companyId, classNameId, tableName, start, end);
307            }
308    
309            public static java.util.List<com.liferay.expando.kernel.model.ExpandoRow> getRows(
310                    long tableId, int start, int end) {
311                    return getService().getRows(tableId, start, end);
312            }
313    
314            /**
315            * Returns the number of rows matching the dynamic query.
316            *
317            * @param dynamicQuery the dynamic query
318            * @return the number of rows matching the dynamic query
319            */
320            public static long dynamicQueryCount(
321                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
322                    return getService().dynamicQueryCount(dynamicQuery);
323            }
324    
325            /**
326            * Returns the number of rows matching the dynamic query.
327            *
328            * @param dynamicQuery the dynamic query
329            * @param projection the projection to apply to the query
330            * @return the number of rows matching the dynamic query
331            */
332            public static long dynamicQueryCount(
333                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
334                    com.liferay.portal.kernel.dao.orm.Projection projection) {
335                    return getService().dynamicQueryCount(dynamicQuery, projection);
336            }
337    
338            public static void deleteRow(
339                    com.liferay.expando.kernel.model.ExpandoRow row) {
340                    getService().deleteRow(row);
341            }
342    
343            public static void deleteRow(long companyId, java.lang.String className,
344                    java.lang.String tableName, long classPK)
345                    throws com.liferay.portal.kernel.exception.PortalException {
346                    getService().deleteRow(companyId, className, tableName, classPK);
347            }
348    
349            public static void deleteRow(long companyId, long classNameId,
350                    java.lang.String tableName, long classPK)
351                    throws com.liferay.portal.kernel.exception.PortalException {
352                    getService().deleteRow(companyId, classNameId, tableName, classPK);
353            }
354    
355            public static void deleteRow(long rowId)
356                    throws com.liferay.portal.kernel.exception.PortalException {
357                    getService().deleteRow(rowId);
358            }
359    
360            public static void deleteRow(long tableId, long classPK)
361                    throws com.liferay.portal.kernel.exception.PortalException {
362                    getService().deleteRow(tableId, classPK);
363            }
364    
365            public static void deleteRows(long classPK) {
366                    getService().deleteRows(classPK);
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    }