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