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) throws PortalException;
052    
053            public com.liferay.portlet.expando.model.ExpandoTable addDefaultTable(
054                    long companyId, long classNameId) throws PortalException;
055    
056            /**
057            * Adds the expando table to the database. Also notifies the appropriate model listeners.
058            *
059            * @param expandoTable the expando table
060            * @return the expando table that was added
061            */
062            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
063            public com.liferay.portlet.expando.model.ExpandoTable addExpandoTable(
064                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
065    
066            public com.liferay.portlet.expando.model.ExpandoTable addTable(
067                    long companyId, java.lang.String className, java.lang.String name)
068                    throws PortalException;
069    
070            public com.liferay.portlet.expando.model.ExpandoTable addTable(
071                    long companyId, long classNameId, java.lang.String name)
072                    throws PortalException;
073    
074            /**
075            * Creates a new expando table with the primary key. Does not add the expando table to the database.
076            *
077            * @param tableId the primary key for the new expando table
078            * @return the new expando table
079            */
080            public com.liferay.portlet.expando.model.ExpandoTable createExpandoTable(
081                    long tableId);
082    
083            /**
084            * Deletes the expando table from the database. Also notifies the appropriate model listeners.
085            *
086            * @param expandoTable the expando table
087            * @return the expando table that was removed
088            */
089            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
090            public com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
091                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
092    
093            /**
094            * Deletes the expando table with the primary key from the database. Also notifies the appropriate model listeners.
095            *
096            * @param tableId the primary key of the expando table
097            * @return the expando table that was removed
098            * @throws PortalException if a expando table with the primary key could not be found
099            */
100            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
101            public com.liferay.portlet.expando.model.ExpandoTable deleteExpandoTable(
102                    long tableId) throws PortalException;
103    
104            /**
105            * @throws PortalException
106            */
107            @Override
108            public com.liferay.portal.model.PersistedModel deletePersistedModel(
109                    com.liferay.portal.model.PersistedModel persistedModel)
110                    throws PortalException;
111    
112            public void deleteTable(long companyId, java.lang.String className,
113                    java.lang.String name) throws PortalException;
114    
115            public void deleteTable(long companyId, long classNameId,
116                    java.lang.String name) throws PortalException;
117    
118            public void deleteTable(
119                    com.liferay.portlet.expando.model.ExpandoTable table);
120    
121            public void deleteTable(long tableId) throws PortalException;
122    
123            public void deleteTables(long companyId, java.lang.String className);
124    
125            public void deleteTables(long companyId, long classNameId);
126    
127            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
128    
129            /**
130            * Performs a dynamic query on the database and returns the matching rows.
131            *
132            * @param dynamicQuery the dynamic query
133            * @return the matching rows
134            */
135            public <T> java.util.List<T> dynamicQuery(
136                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
137    
138            /**
139            * Performs a dynamic query on the database and returns a range of the matching rows.
140            *
141            * <p>
142            * 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.
143            * </p>
144            *
145            * @param dynamicQuery the dynamic query
146            * @param start the lower bound of the range of model instances
147            * @param end the upper bound of the range of model instances (not inclusive)
148            * @return the range of matching rows
149            */
150            public <T> java.util.List<T> dynamicQuery(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
152                    int end);
153    
154            /**
155            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
156            *
157            * <p>
158            * 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.
159            * </p>
160            *
161            * @param dynamicQuery the dynamic query
162            * @param start the lower bound of the range of model instances
163            * @param end the upper bound of the range of model instances (not inclusive)
164            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
165            * @return the ordered range of matching rows
166            */
167            public <T> java.util.List<T> dynamicQuery(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
169                    int end,
170                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
171    
172            /**
173            * Returns the number of rows matching the dynamic query.
174            *
175            * @param dynamicQuery the dynamic query
176            * @return the number of rows matching the dynamic query
177            */
178            public long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
180    
181            /**
182            * Returns the number of rows matching the dynamic query.
183            *
184            * @param dynamicQuery the dynamic query
185            * @param projection the projection to apply to the query
186            * @return the number of rows matching the dynamic query
187            */
188            public long dynamicQueryCount(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
190                    com.liferay.portal.kernel.dao.orm.Projection projection);
191    
192            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193            public com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
194                    long companyId, java.lang.String className);
195    
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public com.liferay.portlet.expando.model.ExpandoTable fetchDefaultTable(
198                    long companyId, long classNameId);
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public com.liferay.portlet.expando.model.ExpandoTable fetchExpandoTable(
202                    long tableId);
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portlet.expando.model.ExpandoTable fetchTable(
206                    long companyId, long classNameId, java.lang.String name);
207    
208            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
210    
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
213                    long companyId, java.lang.String className) throws PortalException;
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portlet.expando.model.ExpandoTable getDefaultTable(
217                    long companyId, long classNameId) throws PortalException;
218    
219            /**
220            * Returns the expando table with the primary key.
221            *
222            * @param tableId the primary key of the expando table
223            * @return the expando table
224            * @throws PortalException if a expando table with the primary key could not be found
225            */
226            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227            public com.liferay.portlet.expando.model.ExpandoTable getExpandoTable(
228                    long tableId) throws PortalException;
229    
230            /**
231            * Returns a range of all the expando tables.
232            *
233            * <p>
234            * 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.
235            * </p>
236            *
237            * @param start the lower bound of the range of expando tables
238            * @param end the upper bound of the range of expando tables (not inclusive)
239            * @return the range of expando tables
240            */
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getExpandoTables(
243                    int start, int end);
244    
245            /**
246            * Returns the number of expando tables.
247            *
248            * @return the number of expando tables
249            */
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public int getExpandoTablesCount();
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
255    
256            /**
257            * Returns the OSGi service identifier.
258            *
259            * @return the OSGi service identifier
260            */
261            public java.lang.String getOSGiServiceIdentifier();
262    
263            @Override
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public com.liferay.portal.model.PersistedModel getPersistedModel(
266                    java.io.Serializable primaryKeyObj) throws PortalException;
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public com.liferay.portlet.expando.model.ExpandoTable getTable(
270                    long companyId, java.lang.String className, java.lang.String name)
271                    throws PortalException;
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public com.liferay.portlet.expando.model.ExpandoTable getTable(
275                    long companyId, long classNameId, java.lang.String name)
276                    throws PortalException;
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public com.liferay.portlet.expando.model.ExpandoTable getTable(long tableId)
280                    throws PortalException;
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
284                    long companyId, java.lang.String className);
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> getTables(
288                    long companyId, long classNameId);
289    
290            /**
291            * Updates the expando table in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
292            *
293            * @param expandoTable the expando table
294            * @return the expando table that was updated
295            */
296            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
297            public com.liferay.portlet.expando.model.ExpandoTable updateExpandoTable(
298                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
299    
300            public com.liferay.portlet.expando.model.ExpandoTable updateTable(
301                    long tableId, java.lang.String name) throws PortalException;
302    }