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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for ExpandoTable. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see ExpandoTableLocalServiceUtil
036     * @see com.liferay.portlet.expando.service.base.ExpandoTableLocalServiceBaseImpl
037     * @see com.liferay.portlet.expando.service.impl.ExpandoTableLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface ExpandoTableLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link ExpandoTableLocalServiceUtil} to access the expando table local service. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoTableLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public com.liferay.portlet.expando.model.ExpandoTable addDefaultTable(
051                    long companyId, java.lang.String className)
052                    throws com.liferay.portal.kernel.exception.PortalException;
053    
054            public com.liferay.portlet.expando.model.ExpandoTable addDefaultTable(
055                    long companyId, long classNameId)
056                    throws com.liferay.portal.kernel.exception.PortalException;
057    
058            /**
059            * Adds the expando table to the database. Also notifies the appropriate model listeners.
060            *
061            * @param expandoTable the expando table
062            * @return the expando table that was added
063            */
064            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
065            public com.liferay.portlet.expando.model.ExpandoTable addExpandoTable(
066                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
067    
068            /**
069            * @deprecated As of 6.1.0, replaced by {@link #addTable(long, String,
070            String)}
071            */
072            @java.lang.Deprecated
073            public com.liferay.portlet.expando.model.ExpandoTable addTable(
074                    java.lang.String className, java.lang.String name)
075                    throws com.liferay.portal.kernel.exception.PortalException;
076    
077            /**
078            * @deprecated As of 6.1.0, replaced by {@link #addTable(long, long,
079            String)}
080            */
081            @java.lang.Deprecated
082            public com.liferay.portlet.expando.model.ExpandoTable addTable(
083                    long classNameId, java.lang.String name)
084                    throws com.liferay.portal.kernel.exception.PortalException;
085    
086            public com.liferay.portlet.expando.model.ExpandoTable addTable(
087                    long companyId, java.lang.String className, java.lang.String name)
088                    throws com.liferay.portal.kernel.exception.PortalException;
089    
090            public com.liferay.portlet.expando.model.ExpandoTable addTable(
091                    long companyId, long classNameId, java.lang.String name)
092                    throws com.liferay.portal.kernel.exception.PortalException;
093    
094            /**
095            * Creates a new expando table with the primary key. Does not add the expando table to the database.
096            *
097            * @param tableId the primary key for the new expando table
098            * @return the new expando table
099            */
100            public com.liferay.portlet.expando.model.ExpandoTable createExpandoTable(
101                    long tableId);
102    
103            /**
104            * Deletes the expando table from the database. Also notifies the appropriate model listeners.
105            *
106            * @param expandoTable the expando table
107            * @return the expando table that was removed
108            */
109            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
110            public com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
111                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
112    
113            /**
114            * Deletes the expando table with the primary key from the database. Also notifies the appropriate model listeners.
115            *
116            * @param tableId the primary key of the expando table
117            * @return the expando table that was removed
118            * @throws PortalException if a expando table with the primary key could not be found
119            */
120            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
121            public com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
122                    long tableId)
123                    throws com.liferay.portal.kernel.exception.PortalException;
124    
125            /**
126            * @throws PortalException
127            */
128            @Override
129            public com.liferay.portal.model.PersistedModel deletePersistedModel(
130                    com.liferay.portal.model.PersistedModel persistedModel)
131                    throws com.liferay.portal.kernel.exception.PortalException;
132    
133            public void deleteTable(long companyId, java.lang.String className,
134                    java.lang.String name)
135                    throws com.liferay.portal.kernel.exception.PortalException;
136    
137            public void deleteTable(long companyId, long classNameId,
138                    java.lang.String name)
139                    throws com.liferay.portal.kernel.exception.PortalException;
140    
141            public void deleteTable(
142                    com.liferay.portlet.expando.model.ExpandoTable table);
143    
144            public void deleteTable(long tableId)
145                    throws com.liferay.portal.kernel.exception.PortalException;
146    
147            public void deleteTables(long companyId, java.lang.String className);
148    
149            public void deleteTables(long companyId, long classNameId);
150    
151            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
152    
153            /**
154            * Performs a dynamic query on the database and returns the matching rows.
155            *
156            * @param dynamicQuery the dynamic query
157            * @return the matching rows
158            */
159            public <T> java.util.List<T> dynamicQuery(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
161    
162            /**
163            * Performs a dynamic query on the database and returns a range of the matching rows.
164            *
165            * <p>
166            * 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.
167            * </p>
168            *
169            * @param dynamicQuery the dynamic query
170            * @param start the lower bound of the range of model instances
171            * @param end the upper bound of the range of model instances (not inclusive)
172            * @return the range of matching rows
173            */
174            public <T> java.util.List<T> dynamicQuery(
175                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
176                    int end);
177    
178            /**
179            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
180            *
181            * <p>
182            * 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.
183            * </p>
184            *
185            * @param dynamicQuery the dynamic query
186            * @param start the lower bound of the range of model instances
187            * @param end the upper bound of the range of model instances (not inclusive)
188            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
189            * @return the ordered range of matching rows
190            */
191            public <T> java.util.List<T> dynamicQuery(
192                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
193                    int end,
194                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
195    
196            /**
197            * Returns the number of rows matching the dynamic query.
198            *
199            * @param dynamicQuery the dynamic query
200            * @return the number of rows matching the dynamic query
201            */
202            public long dynamicQueryCount(
203                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
204    
205            /**
206            * Returns the number of rows matching the dynamic query.
207            *
208            * @param dynamicQuery the dynamic query
209            * @param projection the projection to apply to the query
210            * @return the number of rows matching the dynamic query
211            */
212            public long dynamicQueryCount(
213                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
214                    com.liferay.portal.kernel.dao.orm.Projection projection);
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
218                    long companyId, java.lang.String className);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
222                    long companyId, long classNameId);
223    
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portlet.expando.model.ExpandoTable fetchExpandoTable(
226                    long tableId);
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portlet.expando.model.ExpandoTable fetchTable(
230                    long companyId, long classNameId, java.lang.String name);
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
234    
235            /**
236            * Returns the Spring bean ID for this bean.
237            *
238            * @return the Spring bean ID for this bean
239            */
240            public java.lang.String getBeanIdentifier();
241    
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
244                    long companyId, java.lang.String className)
245                    throws com.liferay.portal.kernel.exception.PortalException;
246    
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
249                    long companyId, long classNameId)
250                    throws com.liferay.portal.kernel.exception.PortalException;
251    
252            /**
253            * Returns the expando table with the primary key.
254            *
255            * @param tableId the primary key of the expando table
256            * @return the expando table
257            * @throws PortalException if a expando table with the primary key could not be found
258            */
259            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260            public com.liferay.portlet.expando.model.ExpandoTable getExpandoTable(
261                    long tableId)
262                    throws com.liferay.portal.kernel.exception.PortalException;
263    
264            /**
265            * Returns a range of all the expando tables.
266            *
267            * <p>
268            * 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.
269            * </p>
270            *
271            * @param start the lower bound of the range of expando tables
272            * @param end the upper bound of the range of expando tables (not inclusive)
273            * @return the range of expando tables
274            */
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getExpandoTables(
277                    int start, int end);
278    
279            /**
280            * Returns the number of expando tables.
281            *
282            * @return the number of expando tables
283            */
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public int getExpandoTablesCount();
286    
287            @Override
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public com.liferay.portal.model.PersistedModel getPersistedModel(
290                    java.io.Serializable primaryKeyObj)
291                    throws com.liferay.portal.kernel.exception.PortalException;
292    
293            /**
294            * @deprecated As of 6.1.0, replaced by {@link #getTable(long, String,
295            String)}
296            */
297            @java.lang.Deprecated
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public com.liferay.portlet.expando.model.ExpandoTable getTable(
300                    java.lang.String className, java.lang.String name)
301                    throws com.liferay.portal.kernel.exception.PortalException;
302    
303            /**
304            * @deprecated As of 6.1.0, replaced by {@link #getTable(long, long,
305            String)}
306            */
307            @java.lang.Deprecated
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public com.liferay.portlet.expando.model.ExpandoTable getTable(
310                    long classNameId, java.lang.String name)
311                    throws com.liferay.portal.kernel.exception.PortalException;
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public com.liferay.portlet.expando.model.ExpandoTable getTable(
315                    long companyId, java.lang.String className, java.lang.String name)
316                    throws com.liferay.portal.kernel.exception.PortalException;
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public com.liferay.portlet.expando.model.ExpandoTable getTable(
320                    long companyId, long classNameId, java.lang.String name)
321                    throws com.liferay.portal.kernel.exception.PortalException;
322    
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public com.liferay.portlet.expando.model.ExpandoTable getTable(long tableId)
325                    throws com.liferay.portal.kernel.exception.PortalException;
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
329                    long companyId, java.lang.String className);
330    
331            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
333                    long companyId, long classNameId);
334    
335            /**
336            * Sets the Spring bean ID for this bean.
337            *
338            * @param beanIdentifier the Spring bean ID for this bean
339            */
340            public void setBeanIdentifier(java.lang.String beanIdentifier);
341    
342            /**
343            * Updates the expando table in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
344            *
345            * @param expandoTable the expando table
346            * @return the expando table that was updated
347            */
348            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
349            public com.liferay.portlet.expando.model.ExpandoTable updateExpandoTable(
350                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
351    
352            public com.liferay.portlet.expando.model.ExpandoTable updateTable(
353                    long tableId, java.lang.String name)
354                    throws com.liferay.portal.kernel.exception.PortalException;
355    }