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            public static com.liferay.portlet.expando.model.ExpandoTable addTable(
067                    long companyId, java.lang.String className, java.lang.String name)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    return getService().addTable(companyId, className, name);
070            }
071    
072            public static com.liferay.portlet.expando.model.ExpandoTable addTable(
073                    long companyId, long classNameId, java.lang.String name)
074                    throws com.liferay.portal.kernel.exception.PortalException {
075                    return getService().addTable(companyId, classNameId, name);
076            }
077    
078            /**
079            * Creates a new expando table with the primary key. Does not add the expando table to the database.
080            *
081            * @param tableId the primary key for the new expando table
082            * @return the new expando table
083            */
084            public static com.liferay.portlet.expando.model.ExpandoTable createExpandoTable(
085                    long tableId) {
086                    return getService().createExpandoTable(tableId);
087            }
088    
089            /**
090            * Deletes the expando table from the database. Also notifies the appropriate model listeners.
091            *
092            * @param expandoTable the expando table
093            * @return the expando table that was removed
094            */
095            public static com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
096                    com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
097                    return getService().deleteExpandoTable(expandoTable);
098            }
099    
100            /**
101            * Deletes the expando table with the primary key from the database. Also notifies the appropriate model listeners.
102            *
103            * @param tableId the primary key of the expando table
104            * @return the expando table that was removed
105            * @throws PortalException if a expando table with the primary key could not be found
106            */
107            public static com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
108                    long tableId)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().deleteExpandoTable(tableId);
111            }
112    
113            /**
114            * @throws PortalException
115            */
116            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
117                    com.liferay.portal.model.PersistedModel persistedModel)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    return getService().deletePersistedModel(persistedModel);
120            }
121    
122            public static void deleteTable(long companyId, java.lang.String className,
123                    java.lang.String name)
124                    throws com.liferay.portal.kernel.exception.PortalException {
125                    getService().deleteTable(companyId, className, name);
126            }
127    
128            public static void deleteTable(long companyId, long classNameId,
129                    java.lang.String name)
130                    throws com.liferay.portal.kernel.exception.PortalException {
131                    getService().deleteTable(companyId, classNameId, name);
132            }
133    
134            public static void deleteTable(
135                    com.liferay.portlet.expando.model.ExpandoTable table) {
136                    getService().deleteTable(table);
137            }
138    
139            public static void deleteTable(long tableId)
140                    throws com.liferay.portal.kernel.exception.PortalException {
141                    getService().deleteTable(tableId);
142            }
143    
144            public static void deleteTables(long companyId, java.lang.String className) {
145                    getService().deleteTables(companyId, className);
146            }
147    
148            public static void deleteTables(long companyId, long classNameId) {
149                    getService().deleteTables(companyId, classNameId);
150            }
151    
152            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
153                    return getService().dynamicQuery();
154            }
155    
156            /**
157            * Performs a dynamic query on the database and returns the matching rows.
158            *
159            * @param dynamicQuery the dynamic query
160            * @return the matching rows
161            */
162            public static <T> java.util.List<T> dynamicQuery(
163                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
164                    return getService().dynamicQuery(dynamicQuery);
165            }
166    
167            /**
168            * Performs a dynamic query on the database and returns a range of the matching rows.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param dynamicQuery the dynamic query
175            * @param start the lower bound of the range of model instances
176            * @param end the upper bound of the range of model instances (not inclusive)
177            * @return the range of matching rows
178            */
179            public static <T> java.util.List<T> dynamicQuery(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
181                    int end) {
182                    return getService().dynamicQuery(dynamicQuery, start, end);
183            }
184    
185            /**
186            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param dynamicQuery the dynamic query
193            * @param start the lower bound of the range of model instances
194            * @param end the upper bound of the range of model instances (not inclusive)
195            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
196            * @return the ordered range of matching rows
197            */
198            public static <T> java.util.List<T> dynamicQuery(
199                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
200                    int end,
201                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
202                    return getService()
203                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
204            }
205    
206            /**
207            * Returns the number of rows matching the dynamic query.
208            *
209            * @param dynamicQuery the dynamic query
210            * @return the number of rows matching the dynamic query
211            */
212            public static long dynamicQueryCount(
213                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
214                    return getService().dynamicQueryCount(dynamicQuery);
215            }
216    
217            /**
218            * Returns the number of rows matching the dynamic query.
219            *
220            * @param dynamicQuery the dynamic query
221            * @param projection the projection to apply to the query
222            * @return the number of rows matching the dynamic query
223            */
224            public static long dynamicQueryCount(
225                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
226                    com.liferay.portal.kernel.dao.orm.Projection projection) {
227                    return getService().dynamicQueryCount(dynamicQuery, projection);
228            }
229    
230            public static com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
231                    long companyId, java.lang.String className) {
232                    return getService().fetchDefaultTable(companyId, className);
233            }
234    
235            public static com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
236                    long companyId, long classNameId) {
237                    return getService().fetchDefaultTable(companyId, classNameId);
238            }
239    
240            public static com.liferay.portlet.expando.model.ExpandoTable fetchExpandoTable(
241                    long tableId) {
242                    return getService().fetchExpandoTable(tableId);
243            }
244    
245            public static com.liferay.portlet.expando.model.ExpandoTable fetchTable(
246                    long companyId, long classNameId, java.lang.String name) {
247                    return getService().fetchTable(companyId, classNameId, name);
248            }
249    
250            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
251                    return getService().getActionableDynamicQuery();
252            }
253    
254            public static com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
255                    long companyId, java.lang.String className)
256                    throws com.liferay.portal.kernel.exception.PortalException {
257                    return getService().getDefaultTable(companyId, className);
258            }
259    
260            public static com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
261                    long companyId, long classNameId)
262                    throws com.liferay.portal.kernel.exception.PortalException {
263                    return getService().getDefaultTable(companyId, classNameId);
264            }
265    
266            /**
267            * Returns the expando table with the primary key.
268            *
269            * @param tableId the primary key of the expando table
270            * @return the expando table
271            * @throws PortalException if a expando table with the primary key could not be found
272            */
273            public static com.liferay.portlet.expando.model.ExpandoTable getExpandoTable(
274                    long tableId)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    return getService().getExpandoTable(tableId);
277            }
278    
279            /**
280            * Returns a range of all the expando tables.
281            *
282            * <p>
283            * 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.
284            * </p>
285            *
286            * @param start the lower bound of the range of expando tables
287            * @param end the upper bound of the range of expando tables (not inclusive)
288            * @return the range of expando tables
289            */
290            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getExpandoTables(
291                    int start, int end) {
292                    return getService().getExpandoTables(start, end);
293            }
294    
295            /**
296            * Returns the number of expando tables.
297            *
298            * @return the number of expando tables
299            */
300            public static int getExpandoTablesCount() {
301                    return getService().getExpandoTablesCount();
302            }
303    
304            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
305                    return getService().getIndexableActionableDynamicQuery();
306            }
307    
308            /**
309            * Returns the OSGi service identifier.
310            *
311            * @return the OSGi service identifier
312            */
313            public static java.lang.String getOSGiServiceIdentifier() {
314                    return getService().getOSGiServiceIdentifier();
315            }
316    
317            public static com.liferay.portal.model.PersistedModel getPersistedModel(
318                    java.io.Serializable primaryKeyObj)
319                    throws com.liferay.portal.kernel.exception.PortalException {
320                    return getService().getPersistedModel(primaryKeyObj);
321            }
322    
323            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
324                    long companyId, java.lang.String className, java.lang.String name)
325                    throws com.liferay.portal.kernel.exception.PortalException {
326                    return getService().getTable(companyId, className, name);
327            }
328    
329            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
330                    long companyId, long classNameId, java.lang.String name)
331                    throws com.liferay.portal.kernel.exception.PortalException {
332                    return getService().getTable(companyId, classNameId, name);
333            }
334    
335            public static com.liferay.portlet.expando.model.ExpandoTable getTable(
336                    long tableId)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    return getService().getTable(tableId);
339            }
340    
341            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
342                    long companyId, java.lang.String className) {
343                    return getService().getTables(companyId, className);
344            }
345    
346            public static java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
347                    long companyId, long classNameId) {
348                    return getService().getTables(companyId, classNameId);
349            }
350    
351            /**
352            * Updates the expando table in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
353            *
354            * @param expandoTable the expando table
355            * @return the expando table that was updated
356            */
357            public static com.liferay.portlet.expando.model.ExpandoTable updateExpandoTable(
358                    com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
359                    return getService().updateExpandoTable(expandoTable);
360            }
361    
362            public static com.liferay.portlet.expando.model.ExpandoTable updateTable(
363                    long tableId, java.lang.String name)
364                    throws com.liferay.portal.kernel.exception.PortalException {
365                    return getService().updateTable(tableId, name);
366            }
367    
368            public static ExpandoTableLocalService getService() {
369                    if (_service == null) {
370                            _service = (ExpandoTableLocalService)PortalBeanLocatorUtil.locate(ExpandoTableLocalService.class.getName());
371    
372                            ReferenceRegistry.registerReference(ExpandoTableLocalServiceUtil.class,
373                                    "_service");
374                    }
375    
376                    return _service;
377            }
378    
379            private static ExpandoTableLocalService _service;
380    }