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.persistence;
016    
017    import com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.expando.model.ExpandoTable;
020    
021    /**
022     * The persistence interface for the expando table service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ExpandoTablePersistenceImpl
030     * @see ExpandoTableUtil
031     * @generated
032     */
033    public interface ExpandoTablePersistence extends BasePersistence<ExpandoTable> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify or reference this interface directly. Always use {@link ExpandoTableUtil} to access the expando table persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
038             */
039    
040            /**
041            * Caches the expando table in the entity cache if it is enabled.
042            *
043            * @param expandoTable the expando table
044            */
045            public void cacheResult(
046                    com.liferay.portlet.expando.model.ExpandoTable expandoTable);
047    
048            /**
049            * Caches the expando tables in the entity cache if it is enabled.
050            *
051            * @param expandoTables the expando tables
052            */
053            public void cacheResult(
054                    java.util.List<com.liferay.portlet.expando.model.ExpandoTable> expandoTables);
055    
056            /**
057            * Creates a new expando table with the primary key. Does not add the expando table to the database.
058            *
059            * @param tableId the primary key for the new expando table
060            * @return the new expando table
061            */
062            public com.liferay.portlet.expando.model.ExpandoTable create(long tableId);
063    
064            /**
065            * Removes the expando table with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param tableId the primary key of the expando table
068            * @return the expando table that was removed
069            * @throws com.liferay.portlet.expando.NoSuchTableException if a expando table with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portlet.expando.model.ExpandoTable remove(long tableId)
073                    throws com.liferay.portal.kernel.exception.SystemException,
074                            com.liferay.portlet.expando.NoSuchTableException;
075    
076            public com.liferay.portlet.expando.model.ExpandoTable updateImpl(
077                    com.liferay.portlet.expando.model.ExpandoTable expandoTable,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Returns the expando table with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchTableException} if it could not be found.
083            *
084            * @param tableId the primary key of the expando table
085            * @return the expando table
086            * @throws com.liferay.portlet.expando.NoSuchTableException if a expando table with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portlet.expando.model.ExpandoTable findByPrimaryKey(
090                    long tableId)
091                    throws com.liferay.portal.kernel.exception.SystemException,
092                            com.liferay.portlet.expando.NoSuchTableException;
093    
094            /**
095            * Returns the expando table with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param tableId the primary key of the expando table
098            * @return the expando table, or <code>null</code> if a expando table with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portlet.expando.model.ExpandoTable fetchByPrimaryKey(
102                    long tableId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Returns all the expando tables where companyId = &#63; and classNameId = &#63;.
107            *
108            * @param companyId the company ID
109            * @param classNameId the class name ID
110            * @return the matching expando tables
111            * @throws SystemException if a system exception occurred
112            */
113            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
114                    long companyId, long classNameId)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Returns a range of all the expando tables where companyId = &#63; and classNameId = &#63;.
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 companyId the company ID
125            * @param classNameId the class name ID
126            * @param start the lower bound of the range of expando tables
127            * @param end the upper bound of the range of expando tables (not inclusive)
128            * @return the range of matching expando tables
129            * @throws SystemException if a system exception occurred
130            */
131            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
132                    long companyId, long classNameId, int start, int end)
133                    throws com.liferay.portal.kernel.exception.SystemException;
134    
135            /**
136            * Returns an ordered range of all the expando tables where companyId = &#63; and classNameId = &#63;.
137            *
138            * <p>
139            * 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.
140            * </p>
141            *
142            * @param companyId the company ID
143            * @param classNameId the class name ID
144            * @param start the lower bound of the range of expando tables
145            * @param end the upper bound of the range of expando tables (not inclusive)
146            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
147            * @return the ordered range of matching expando tables
148            * @throws SystemException if a system exception occurred
149            */
150            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
151                    long companyId, long classNameId, int start, int end,
152                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153                    throws com.liferay.portal.kernel.exception.SystemException;
154    
155            /**
156            * Returns the first expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
157            *
158            * <p>
159            * 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.
160            * </p>
161            *
162            * @param companyId the company ID
163            * @param classNameId the class name ID
164            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
165            * @return the first matching expando table
166            * @throws com.liferay.portlet.expando.NoSuchTableException if a matching expando table could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public com.liferay.portlet.expando.model.ExpandoTable findByC_C_First(
170                    long companyId, long classNameId,
171                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172                    throws com.liferay.portal.kernel.exception.SystemException,
173                            com.liferay.portlet.expando.NoSuchTableException;
174    
175            /**
176            * Returns the last expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
177            *
178            * <p>
179            * 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.
180            * </p>
181            *
182            * @param companyId the company ID
183            * @param classNameId the class name ID
184            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
185            * @return the last matching expando table
186            * @throws com.liferay.portlet.expando.NoSuchTableException if a matching expando table could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public com.liferay.portlet.expando.model.ExpandoTable findByC_C_Last(
190                    long companyId, long classNameId,
191                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192                    throws com.liferay.portal.kernel.exception.SystemException,
193                            com.liferay.portlet.expando.NoSuchTableException;
194    
195            /**
196            * Returns the expando tables before and after the current expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
197            *
198            * <p>
199            * 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.
200            * </p>
201            *
202            * @param tableId the primary key of the current expando table
203            * @param companyId the company ID
204            * @param classNameId the class name ID
205            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
206            * @return the previous, current, and next expando table
207            * @throws com.liferay.portlet.expando.NoSuchTableException if a expando table with the primary key could not be found
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portlet.expando.model.ExpandoTable[] findByC_C_PrevAndNext(
211                    long tableId, long companyId, long classNameId,
212                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213                    throws com.liferay.portal.kernel.exception.SystemException,
214                            com.liferay.portlet.expando.NoSuchTableException;
215    
216            /**
217            * Returns the expando table where companyId = &#63; and classNameId = &#63; and name = &#63; or throws a {@link com.liferay.portlet.expando.NoSuchTableException} if it could not be found.
218            *
219            * @param companyId the company ID
220            * @param classNameId the class name ID
221            * @param name the name
222            * @return the matching expando table
223            * @throws com.liferay.portlet.expando.NoSuchTableException if a matching expando table could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public com.liferay.portlet.expando.model.ExpandoTable findByC_C_N(
227                    long companyId, long classNameId, java.lang.String name)
228                    throws com.liferay.portal.kernel.exception.SystemException,
229                            com.liferay.portlet.expando.NoSuchTableException;
230    
231            /**
232            * Returns the expando table where companyId = &#63; and classNameId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
233            *
234            * @param companyId the company ID
235            * @param classNameId the class name ID
236            * @param name the name
237            * @return the matching expando table, or <code>null</code> if a matching expando table could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N(
241                    long companyId, long classNameId, java.lang.String name)
242                    throws com.liferay.portal.kernel.exception.SystemException;
243    
244            /**
245            * Returns the expando table where companyId = &#63; and classNameId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
246            *
247            * @param companyId the company ID
248            * @param classNameId the class name ID
249            * @param name the name
250            * @param retrieveFromCache whether to use the finder cache
251            * @return the matching expando table, or <code>null</code> if a matching expando table could not be found
252            * @throws SystemException if a system exception occurred
253            */
254            public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N(
255                    long companyId, long classNameId, java.lang.String name,
256                    boolean retrieveFromCache)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Returns all the expando tables.
261            *
262            * @return the expando tables
263            * @throws SystemException if a system exception occurred
264            */
265            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll()
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            /**
269            * Returns a range of all the expando tables.
270            *
271            * <p>
272            * 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.
273            * </p>
274            *
275            * @param start the lower bound of the range of expando tables
276            * @param end the upper bound of the range of expando tables (not inclusive)
277            * @return the range of expando tables
278            * @throws SystemException if a system exception occurred
279            */
280            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll(
281                    int start, int end)
282                    throws com.liferay.portal.kernel.exception.SystemException;
283    
284            /**
285            * Returns an ordered range of all the expando tables.
286            *
287            * <p>
288            * 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.
289            * </p>
290            *
291            * @param start the lower bound of the range of expando tables
292            * @param end the upper bound of the range of expando tables (not inclusive)
293            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
294            * @return the ordered range of expando tables
295            * @throws SystemException if a system exception occurred
296            */
297            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll(
298                    int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
300                    throws com.liferay.portal.kernel.exception.SystemException;
301    
302            /**
303            * Removes all the expando tables where companyId = &#63; and classNameId = &#63; from the database.
304            *
305            * @param companyId the company ID
306            * @param classNameId the class name ID
307            * @throws SystemException if a system exception occurred
308            */
309            public void removeByC_C(long companyId, long classNameId)
310                    throws com.liferay.portal.kernel.exception.SystemException;
311    
312            /**
313            * Removes the expando table where companyId = &#63; and classNameId = &#63; and name = &#63; from the database.
314            *
315            * @param companyId the company ID
316            * @param classNameId the class name ID
317            * @param name the name
318            * @throws SystemException if a system exception occurred
319            */
320            public void removeByC_C_N(long companyId, long classNameId,
321                    java.lang.String name)
322                    throws com.liferay.portal.kernel.exception.SystemException,
323                            com.liferay.portlet.expando.NoSuchTableException;
324    
325            /**
326            * Removes all the expando tables from the database.
327            *
328            * @throws SystemException if a system exception occurred
329            */
330            public void removeAll()
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            /**
334            * Returns the number of expando tables where companyId = &#63; and classNameId = &#63;.
335            *
336            * @param companyId the company ID
337            * @param classNameId the class name ID
338            * @return the number of matching expando tables
339            * @throws SystemException if a system exception occurred
340            */
341            public int countByC_C(long companyId, long classNameId)
342                    throws com.liferay.portal.kernel.exception.SystemException;
343    
344            /**
345            * Returns the number of expando tables where companyId = &#63; and classNameId = &#63; and name = &#63;.
346            *
347            * @param companyId the company ID
348            * @param classNameId the class name ID
349            * @param name the name
350            * @return the number of matching expando tables
351            * @throws SystemException if a system exception occurred
352            */
353            public int countByC_C_N(long companyId, long classNameId,
354                    java.lang.String name)
355                    throws com.liferay.portal.kernel.exception.SystemException;
356    
357            /**
358            * Returns the number of expando tables.
359            *
360            * @return the number of expando tables
361            * @throws SystemException if a system exception occurred
362            */
363            public int countAll()
364                    throws com.liferay.portal.kernel.exception.SystemException;
365    }