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 ExpandoTable. This utility wraps
024     * {@link com.liferay.portlet.expando.service.impl.ExpandoTableLocalServiceImpl} 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 ExpandoTableLocalService
032     * @see com.liferay.portlet.expando.service.base.ExpandoTableLocalServiceBaseImpl
033     * @see com.liferay.portlet.expando.service.impl.ExpandoTableLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ExpandoTableLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoTableLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.expando.model.ExpandoTable addDefaultTable(
044                    long companyId, java.lang.String className)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService().addDefaultTable(companyId, className);
047            }
048    
049            public static com.liferay.portlet.expando.model.ExpandoTable addDefaultTable(
050                    long companyId, long classNameId)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService().addDefaultTable(companyId, classNameId);
053            }
054    
055            /**
056            * Adds the expando table to the database. Also notifies the appropriate model listeners.
057            *
058            * @param expandoTable the expando table
059            * @return the expando table that was added
060            */
061            public static com.liferay.portlet.expando.model.ExpandoTable addExpandoTable(
062                    com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
063                    return getService().addExpandoTable(expandoTable);
064            }
065    
066            /**
067            * @deprecated As of 6.1.0, replaced by {@link #addTable(long, String,
068            String)}
069            */
070            @Deprecated
071            public static com.liferay.portlet.expando.model.ExpandoTable addTable(
072                    java.lang.String className, java.lang.String name)
073                    throws com.liferay.portal.kernel.exception.PortalException {
074                    return getService().addTable(className, name);
075            }
076    
077            /**
078            * @deprecated As of 6.1.0, replaced by {@link #addTable(long, long,
079            String)}
080            */
081            @Deprecated
082            public static com.liferay.portlet.expando.model.ExpandoTable addTable(
083                    long classNameId, java.lang.String name)
084                    throws com.liferay.portal.kernel.exception.PortalException {
085                    return getService().addTable(classNameId, name);
086            }
087    
088            public static com.liferay.portlet.expando.model.ExpandoTable addTable(
089                    long companyId, java.lang.String className, java.lang.String name)
090                    throws com.liferay.portal.kernel.exception.PortalException {
091                    return getService().addTable(companyId, className, name);
092            }
093    
094            public static com.liferay.portlet.expando.model.ExpandoTable addTable(
095                    long companyId, long classNameId, java.lang.String name)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService().addTable(companyId, classNameId, name);
098            }
099    
100            /**
101            * Creates a new expando table with the primary key. Does not add the expando table to the database.
102            *
103            * @param tableId the primary key for the new expando table
104            * @return the new expando table
105            */
106            public static com.liferay.portlet.expando.model.ExpandoTable createExpandoTable(
107                    long tableId) {
108                    return getService().createExpandoTable(tableId);
109            }
110    
111            /**
112            * Deletes the expando table from the database. Also notifies the appropriate model listeners.
113            *
114            * @param expandoTable the expando table
115            * @return the expando table that was removed
116            */
117            public static com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
118                    com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
119                    return getService().deleteExpandoTable(expandoTable);
120            }
121    
122            /**
123            * Deletes the expando table with the primary key from the database. Also notifies the appropriate model listeners.
124            *
125            * @param tableId the primary key of the expando table
126            * @return the expando table that was removed
127            * @throws PortalException if a expando table with the primary key could not be found
128            */
129            public static com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
130                    long tableId)
131                    throws com.liferay.portal.kernel.exception.PortalException {
132                    return getService().deleteExpandoTable(tableId);
133            }
134    
135            /**
136            * @throws PortalException
137            */
138            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
139                    com.liferay.portal.model.PersistedModel persistedModel)
140                    throws com.liferay.portal.kernel.exception.PortalException {
141                    return getService().deletePersistedModel(persistedModel);
142            }
143    
144            public static void deleteTable(long companyId, java.lang.String className,
145                    java.lang.String name)
146                    throws com.liferay.portal.kernel.exception.PortalException {
147                    getService().deleteTable(companyId, className, name);
148            }
149    
150            public static void deleteTable(long companyId, long classNameId,
151                    java.lang.String name)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    getService().deleteTable(companyId, classNameId, name);
154            }
155    
156            public static void deleteTable(
157                    com.liferay.portlet.expando.model.ExpandoTable table) {
158                    getService().deleteTable(table);
159            }
160    
161            public static void deleteTable(long tableId)
162                    throws com.liferay.portal.kernel.exception.PortalException {
163                    getService().deleteTable(tableId);
164            }
165    
166            public static void deleteTables(long companyId, java.lang.String className) {
167                    getService().deleteTables(companyId, className);
168            }
169    
170            public static void deleteTables(long companyId, long classNameId) {
171                    getService().deleteTables(companyId, classNameId);
172            }
173    
174            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
175                    return getService().dynamicQuery();
176            }
177    
178            /**
179            * Performs a dynamic query on the database and returns the matching rows.
180            *
181            * @param dynamicQuery the dynamic query
182            * @return the matching rows
183            */
184            public static <T> java.util.List<T> dynamicQuery(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
186                    return getService().dynamicQuery(dynamicQuery);
187            }
188    
189            /**
190            * Performs a dynamic query on the database and returns a range of the matching rows.
191            *
192            * <p>
193            * 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.ExpandoTableModelImpl}. 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.
194            * </p>
195            *
196            * @param dynamicQuery the dynamic query
197            * @param start the lower bound of the range of model instances
198            * @param end the upper bound of the range of model instances (not inclusive)
199            * @return the range of matching rows
200            */
201            public static <T> java.util.List<T> dynamicQuery(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
203                    int end) {
204                    return getService().dynamicQuery(dynamicQuery, start, end);
205            }
206    
207            /**
208            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
209            *
210            * <p>
211            * 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.ExpandoTableModelImpl}. 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.
212            * </p>
213            *
214            * @param dynamicQuery the dynamic query
215            * @param start the lower bound of the range of model instances
216            * @param end the upper bound of the range of model instances (not inclusive)
217            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
218            * @return the ordered range of matching rows
219            */
220            public static <T> java.util.List<T> dynamicQuery(
221                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
222                    int end,
223                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
224                    return getService()
225                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
226            }
227    
228            /**
229            * Returns the number of rows matching the dynamic query.
230            *
231            * @param dynamicQuery the dynamic query
232            * @return the number of rows matching the dynamic query
233            */
234            public static long dynamicQueryCount(
235                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
236                    return getService().dynamicQueryCount(dynamicQuery);
237            }
238    
239            /**
240            * Returns the number of rows matching the dynamic query.
241            *
242            * @param dynamicQuery the dynamic query
243            * @param projection the projection to apply to the query
244            * @return the number of rows matching the dynamic query
245            */
246            public static long dynamicQueryCount(
247                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
248                    com.liferay.portal.kernel.dao.orm.Projection projection) {
249                    return getService().dynamicQueryCount(dynamicQuery, projection);
250            }
251    
252            public static com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
253                    long companyId, java.lang.String className) {
254                    return getService().fetchDefaultTable(companyId, className);
255            }
256    
257            public static com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
258                    long companyId, long classNameId) {
259                    return getService().fetchDefaultTable(companyId, classNameId);
260            }
261    
262            public static com.liferay.portlet.expando.model.ExpandoTable fetchExpandoTable(
263                    long tableId) {
264                    return getService().fetchExpandoTable(tableId);
265            }
266    
267            public static com.liferay.portlet.expando.model.ExpandoTable fetchTable(
268                    long companyId, long classNameId, java.lang.String name) {
269                    return getService().fetchTable(companyId, classNameId, name);
270            }
271    
272            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
273                    return getService().getActionableDynamicQuery();
274            }
275    
276            public static com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
277                    long companyId, java.lang.String className)
278                    throws com.liferay.portal.kernel.exception.PortalException {
279                    return getService().getDefaultTable(companyId, className);
280            }
281    
282            public static com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
283                    long companyId, long classNameId)
284                    throws com.liferay.portal.kernel.exception.PortalException {
285                    return getService().getDefaultTable(companyId, classNameId);
286            }
287    
288            /**
289            * Returns the expando table with the primary key.
290            *
291            * @param tableId the primary key of the expando table
292            * @return the expando table
293            * @throws PortalException if a expando table with the primary key could not be found
294            */
295            public static com.liferay.portlet.expando.model.ExpandoTable getExpandoTable(
296                    long tableId)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return getService().getExpandoTable(tableId);
299            }
300    
301            /**
302            * Returns a range of all the expando tables.
303            *
304            * <p>
305            * 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.ExpandoTableModelImpl}. 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.
306            * </p>
307            *
308            * @param start the lower bound of the range of expando tables
309            * @param end the upper bound of the range of expando tables (not inclusive)
310            * @return the range of expando tables
311            */
312            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getExpandoTables(
313                    int start, int end) {
314                    return getService().getExpandoTables(start, end);
315            }
316    
317            /**
318            * Returns the number of expando tables.
319            *
320            * @return the number of expando tables
321            */
322            public static int getExpandoTablesCount() {
323                    return getService().getExpandoTablesCount();
324            }
325    
326            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
327                    return getService().getIndexableActionableDynamicQuery();
328            }
329    
330            /**
331            * Returns the OSGi service identifier.
332            *
333            * @return the OSGi service identifier
334            */
335            public static java.lang.String getOSGiServiceIdentifier() {
336                    return getService().getOSGiServiceIdentifier();
337            }
338    
339            public static com.liferay.portal.model.PersistedModel getPersistedModel(
340                    java.io.Serializable primaryKeyObj)
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return getService().getPersistedModel(primaryKeyObj);
343            }
344    
345            /**
346            * @deprecated As of 6.1.0, replaced by {@link #getTable(long, String,
347            String)}
348            */
349            @Deprecated
350            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
351                    java.lang.String className, java.lang.String name)
352                    throws com.liferay.portal.kernel.exception.PortalException {
353                    return getService().getTable(className, name);
354            }
355    
356            /**
357            * @deprecated As of 6.1.0, replaced by {@link #getTable(long, long,
358            String)}
359            */
360            @Deprecated
361            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
362                    long classNameId, java.lang.String name)
363                    throws com.liferay.portal.kernel.exception.PortalException {
364                    return getService().getTable(classNameId, name);
365            }
366    
367            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
368                    long companyId, java.lang.String className, java.lang.String name)
369                    throws com.liferay.portal.kernel.exception.PortalException {
370                    return getService().getTable(companyId, className, name);
371            }
372    
373            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
374                    long companyId, long classNameId, java.lang.String name)
375                    throws com.liferay.portal.kernel.exception.PortalException {
376                    return getService().getTable(companyId, classNameId, name);
377            }
378    
379            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
380                    long tableId)
381                    throws com.liferay.portal.kernel.exception.PortalException {
382                    return getService().getTable(tableId);
383            }
384    
385            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
386                    long companyId, java.lang.String className) {
387                    return getService().getTables(companyId, className);
388            }
389    
390            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
391                    long companyId, long classNameId) {
392                    return getService().getTables(companyId, classNameId);
393            }
394    
395            /**
396            * Updates the expando table in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
397            *
398            * @param expandoTable the expando table
399            * @return the expando table that was updated
400            */
401            public static com.liferay.portlet.expando.model.ExpandoTable updateExpandoTable(
402                    com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
403                    return getService().updateExpandoTable(expandoTable);
404            }
405    
406            public static com.liferay.portlet.expando.model.ExpandoTable updateTable(
407                    long tableId, java.lang.String name)
408                    throws com.liferay.portal.kernel.exception.PortalException {
409                    return getService().updateTable(tableId, name);
410            }
411    
412            public static ExpandoTableLocalService getService() {
413                    if (_service == null) {
414                            _service = (ExpandoTableLocalService)PortalBeanLocatorUtil.locate(ExpandoTableLocalService.class.getName());
415    
416                            ReferenceRegistry.registerReference(ExpandoTableLocalServiceUtil.class,
417                                    "_service");
418                    }
419    
420                    return _service;
421            }
422    
423            /**
424             * @deprecated As of 6.2.0
425             */
426            @Deprecated
427            public void setService(ExpandoTableLocalService service) {
428            }
429    
430            private static ExpandoTableLocalService _service;
431    }