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