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