001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.expando.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for 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.expando.kernel.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.expando.kernel.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.expando.kernel.model.ExpandoTable addExpandoTable(
062                    com.liferay.expando.kernel.model.ExpandoTable expandoTable) {
063                    return getService().addExpandoTable(expandoTable);
064            }
065    
066            public static com.liferay.expando.kernel.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.expando.kernel.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.expando.kernel.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.expando.kernel.model.ExpandoTable deleteExpandoTable(
096                    com.liferay.expando.kernel.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.expando.kernel.model.ExpandoTable deleteExpandoTable(
108                    long tableId)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().deleteExpandoTable(tableId);
111            }
112    
113            public static com.liferay.expando.kernel.model.ExpandoTable fetchDefaultTable(
114                    long companyId, java.lang.String className) {
115                    return getService().fetchDefaultTable(companyId, className);
116            }
117    
118            public static com.liferay.expando.kernel.model.ExpandoTable fetchDefaultTable(
119                    long companyId, long classNameId) {
120                    return getService().fetchDefaultTable(companyId, classNameId);
121            }
122    
123            public static com.liferay.expando.kernel.model.ExpandoTable fetchExpandoTable(
124                    long tableId) {
125                    return getService().fetchExpandoTable(tableId);
126            }
127    
128            public static com.liferay.expando.kernel.model.ExpandoTable fetchTable(
129                    long companyId, long classNameId, java.lang.String name) {
130                    return getService().fetchTable(companyId, classNameId, name);
131            }
132    
133            public static com.liferay.expando.kernel.model.ExpandoTable getDefaultTable(
134                    long companyId, java.lang.String className)
135                    throws com.liferay.portal.kernel.exception.PortalException {
136                    return getService().getDefaultTable(companyId, className);
137            }
138    
139            public static com.liferay.expando.kernel.model.ExpandoTable getDefaultTable(
140                    long companyId, long classNameId)
141                    throws com.liferay.portal.kernel.exception.PortalException {
142                    return getService().getDefaultTable(companyId, classNameId);
143            }
144    
145            /**
146            * Returns the expando table with the primary key.
147            *
148            * @param tableId the primary key of the expando table
149            * @return the expando table
150            * @throws PortalException if a expando table with the primary key could not be found
151            */
152            public static com.liferay.expando.kernel.model.ExpandoTable getExpandoTable(
153                    long tableId)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    return getService().getExpandoTable(tableId);
156            }
157    
158            public static com.liferay.expando.kernel.model.ExpandoTable getTable(
159                    long companyId, java.lang.String className, java.lang.String name)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    return getService().getTable(companyId, className, name);
162            }
163    
164            public static com.liferay.expando.kernel.model.ExpandoTable getTable(
165                    long companyId, long classNameId, java.lang.String name)
166                    throws com.liferay.portal.kernel.exception.PortalException {
167                    return getService().getTable(companyId, classNameId, name);
168            }
169    
170            public static com.liferay.expando.kernel.model.ExpandoTable getTable(
171                    long tableId)
172                    throws com.liferay.portal.kernel.exception.PortalException {
173                    return getService().getTable(tableId);
174            }
175    
176            /**
177            * Updates the expando table in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
178            *
179            * @param expandoTable the expando table
180            * @return the expando table that was updated
181            */
182            public static com.liferay.expando.kernel.model.ExpandoTable updateExpandoTable(
183                    com.liferay.expando.kernel.model.ExpandoTable expandoTable) {
184                    return getService().updateExpandoTable(expandoTable);
185            }
186    
187            public static com.liferay.expando.kernel.model.ExpandoTable updateTable(
188                    long tableId, java.lang.String name)
189                    throws com.liferay.portal.kernel.exception.PortalException {
190                    return getService().updateTable(tableId, name);
191            }
192    
193            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
194                    return getService().getActionableDynamicQuery();
195            }
196    
197            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
198                    return getService().dynamicQuery();
199            }
200    
201            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
202                    return getService().getIndexableActionableDynamicQuery();
203            }
204    
205            /**
206            * @throws PortalException
207            */
208            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
209                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
210                    throws com.liferay.portal.kernel.exception.PortalException {
211                    return getService().deletePersistedModel(persistedModel);
212            }
213    
214            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
215                    java.io.Serializable primaryKeyObj)
216                    throws com.liferay.portal.kernel.exception.PortalException {
217                    return getService().getPersistedModel(primaryKeyObj);
218            }
219    
220            /**
221            * Returns the number of expando tables.
222            *
223            * @return the number of expando tables
224            */
225            public static int getExpandoTablesCount() {
226                    return getService().getExpandoTablesCount();
227            }
228    
229            /**
230            * Returns the OSGi service identifier.
231            *
232            * @return the OSGi service identifier
233            */
234            public static java.lang.String getOSGiServiceIdentifier() {
235                    return getService().getOSGiServiceIdentifier();
236            }
237    
238            /**
239            * Performs a dynamic query on the database and returns the matching rows.
240            *
241            * @param dynamicQuery the dynamic query
242            * @return the matching rows
243            */
244            public static <T> java.util.List<T> dynamicQuery(
245                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
246                    return getService().dynamicQuery(dynamicQuery);
247            }
248    
249            /**
250            * Performs a dynamic query on the database and returns a range of the matching rows.
251            *
252            * <p>
253            * 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.
254            * </p>
255            *
256            * @param dynamicQuery the dynamic query
257            * @param start the lower bound of the range of model instances
258            * @param end the upper bound of the range of model instances (not inclusive)
259            * @return the range of matching rows
260            */
261            public static <T> java.util.List<T> dynamicQuery(
262                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
263                    int end) {
264                    return getService().dynamicQuery(dynamicQuery, start, end);
265            }
266    
267            /**
268            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
269            *
270            * <p>
271            * 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.
272            * </p>
273            *
274            * @param dynamicQuery the dynamic query
275            * @param start the lower bound of the range of model instances
276            * @param end the upper bound of the range of model instances (not inclusive)
277            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
278            * @return the ordered range of matching rows
279            */
280            public static <T> java.util.List<T> dynamicQuery(
281                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
282                    int end,
283                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
284                    return getService()
285                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
286            }
287    
288            /**
289            * Returns a range of all the expando tables.
290            *
291            * <p>
292            * 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.
293            * </p>
294            *
295            * @param start the lower bound of the range of expando tables
296            * @param end the upper bound of the range of expando tables (not inclusive)
297            * @return the range of expando tables
298            */
299            public static java.util.List<com.liferay.expando.kernel.model.ExpandoTable> getExpandoTables(
300                    int start, int end) {
301                    return getService().getExpandoTables(start, end);
302            }
303    
304            public static java.util.List<com.liferay.expando.kernel.model.ExpandoTable> getTables(
305                    long companyId, java.lang.String className) {
306                    return getService().getTables(companyId, className);
307            }
308    
309            public static java.util.List<com.liferay.expando.kernel.model.ExpandoTable> getTables(
310                    long companyId, long classNameId) {
311                    return getService().getTables(companyId, classNameId);
312            }
313    
314            /**
315            * Returns the number of rows matching the dynamic query.
316            *
317            * @param dynamicQuery the dynamic query
318            * @return the number of rows matching the dynamic query
319            */
320            public static long dynamicQueryCount(
321                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
322                    return getService().dynamicQueryCount(dynamicQuery);
323            }
324    
325            /**
326            * Returns the number of rows matching the dynamic query.
327            *
328            * @param dynamicQuery the dynamic query
329            * @param projection the projection to apply to the query
330            * @return the number of rows matching the dynamic query
331            */
332            public static long dynamicQueryCount(
333                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
334                    com.liferay.portal.kernel.dao.orm.Projection projection) {
335                    return getService().dynamicQueryCount(dynamicQuery, projection);
336            }
337    
338            public static void deleteTable(
339                    com.liferay.expando.kernel.model.ExpandoTable table) {
340                    getService().deleteTable(table);
341            }
342    
343            public static void deleteTable(long companyId, java.lang.String className,
344                    java.lang.String name)
345                    throws com.liferay.portal.kernel.exception.PortalException {
346                    getService().deleteTable(companyId, className, name);
347            }
348    
349            public static void deleteTable(long companyId, long classNameId,
350                    java.lang.String name)
351                    throws com.liferay.portal.kernel.exception.PortalException {
352                    getService().deleteTable(companyId, classNameId, name);
353            }
354    
355            public static void deleteTable(long tableId)
356                    throws com.liferay.portal.kernel.exception.PortalException {
357                    getService().deleteTable(tableId);
358            }
359    
360            public static void deleteTables(long companyId, java.lang.String className) {
361                    getService().deleteTables(companyId, className);
362            }
363    
364            public static void deleteTables(long companyId, long classNameId) {
365                    getService().deleteTables(companyId, classNameId);
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    }