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