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            /**
277            * Returns the Spring bean ID for this bean.
278            *
279            * @return the Spring bean ID for this bean
280            */
281            public static java.lang.String getBeanIdentifier() {
282                    return getService().getBeanIdentifier();
283            }
284    
285            public static com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
286                    long companyId, java.lang.String className)
287                    throws com.liferay.portal.kernel.exception.PortalException {
288                    return getService().getDefaultTable(companyId, className);
289            }
290    
291            public static com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
292                    long companyId, long classNameId)
293                    throws com.liferay.portal.kernel.exception.PortalException {
294                    return getService().getDefaultTable(companyId, classNameId);
295            }
296    
297            /**
298            * Returns the expando table with the primary key.
299            *
300            * @param tableId the primary key of the expando table
301            * @return the expando table
302            * @throws PortalException if a expando table with the primary key could not be found
303            */
304            public static com.liferay.portlet.expando.model.ExpandoTable getExpandoTable(
305                    long tableId)
306                    throws com.liferay.portal.kernel.exception.PortalException {
307                    return getService().getExpandoTable(tableId);
308            }
309    
310            /**
311            * Returns a range of all the expando tables.
312            *
313            * <p>
314            * 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.
315            * </p>
316            *
317            * @param start the lower bound of the range of expando tables
318            * @param end the upper bound of the range of expando tables (not inclusive)
319            * @return the range of expando tables
320            */
321            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getExpandoTables(
322                    int start, int end) {
323                    return getService().getExpandoTables(start, end);
324            }
325    
326            /**
327            * Returns the number of expando tables.
328            *
329            * @return the number of expando tables
330            */
331            public static int getExpandoTablesCount() {
332                    return getService().getExpandoTablesCount();
333            }
334    
335            public static com.liferay.portal.model.PersistedModel getPersistedModel(
336                    java.io.Serializable primaryKeyObj)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    return getService().getPersistedModel(primaryKeyObj);
339            }
340    
341            /**
342            * @deprecated As of 6.1.0, replaced by {@link #getTable(long, String,
343            String)}
344            */
345            @Deprecated
346            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
347                    java.lang.String className, java.lang.String name)
348                    throws com.liferay.portal.kernel.exception.PortalException {
349                    return getService().getTable(className, name);
350            }
351    
352            /**
353            * @deprecated As of 6.1.0, replaced by {@link #getTable(long, long,
354            String)}
355            */
356            @Deprecated
357            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
358                    long classNameId, java.lang.String name)
359                    throws com.liferay.portal.kernel.exception.PortalException {
360                    return getService().getTable(classNameId, name);
361            }
362    
363            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
364                    long companyId, java.lang.String className, java.lang.String name)
365                    throws com.liferay.portal.kernel.exception.PortalException {
366                    return getService().getTable(companyId, className, name);
367            }
368    
369            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
370                    long companyId, long classNameId, java.lang.String name)
371                    throws com.liferay.portal.kernel.exception.PortalException {
372                    return getService().getTable(companyId, classNameId, name);
373            }
374    
375            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
376                    long tableId)
377                    throws com.liferay.portal.kernel.exception.PortalException {
378                    return getService().getTable(tableId);
379            }
380    
381            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
382                    long companyId, java.lang.String className) {
383                    return getService().getTables(companyId, className);
384            }
385    
386            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
387                    long companyId, long classNameId) {
388                    return getService().getTables(companyId, classNameId);
389            }
390    
391            /**
392            * Sets the Spring bean ID for this bean.
393            *
394            * @param beanIdentifier the Spring bean ID for this bean
395            */
396            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
397                    getService().setBeanIdentifier(beanIdentifier);
398            }
399    
400            /**
401            * Updates the expando table in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
402            *
403            * @param expandoTable the expando table
404            * @return the expando table that was updated
405            */
406            public static com.liferay.portlet.expando.model.ExpandoTable updateExpandoTable(
407                    com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
408                    return getService().updateExpandoTable(expandoTable);
409            }
410    
411            public static com.liferay.portlet.expando.model.ExpandoTable updateTable(
412                    long tableId, java.lang.String name)
413                    throws com.liferay.portal.kernel.exception.PortalException {
414                    return getService().updateTable(tableId, name);
415            }
416    
417            public static ExpandoTableLocalService getService() {
418                    if (_service == null) {
419                            _service = (ExpandoTableLocalService)PortalBeanLocatorUtil.locate(ExpandoTableLocalService.class.getName());
420    
421                            ReferenceRegistry.registerReference(ExpandoTableLocalServiceUtil.class,
422                                    "_service");
423                    }
424    
425                    return _service;
426            }
427    
428            /**
429             * @deprecated As of 6.2.0
430             */
431            @Deprecated
432            public void setService(ExpandoTableLocalService service) {
433            }
434    
435            private static ExpandoTableLocalService _service;
436    }