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                    throws com.liferay.portal.kernel.exception.SystemException;
079    
080            /**
081            * Returns the expando table with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchTableException} if it could not be found.
082            *
083            * @param tableId the primary key of the expando table
084            * @return the expando table
085            * @throws com.liferay.portlet.expando.NoSuchTableException if a expando table with the primary key could not be found
086            * @throws SystemException if a system exception occurred
087            */
088            public com.liferay.portlet.expando.model.ExpandoTable findByPrimaryKey(
089                    long tableId)
090                    throws com.liferay.portal.kernel.exception.SystemException,
091                            com.liferay.portlet.expando.NoSuchTableException;
092    
093            /**
094            * Returns the expando table with the primary key or returns <code>null</code> if it could not be found.
095            *
096            * @param tableId the primary key of the expando table
097            * @return the expando table, or <code>null</code> if a expando table with the primary key could not be found
098            * @throws SystemException if a system exception occurred
099            */
100            public com.liferay.portlet.expando.model.ExpandoTable fetchByPrimaryKey(
101                    long tableId)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            /**
105            * Returns all the expando tables where companyId = &#63; and classNameId = &#63;.
106            *
107            * @param companyId the company ID
108            * @param classNameId the class name ID
109            * @return the matching expando tables
110            * @throws SystemException if a system exception occurred
111            */
112            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
113                    long companyId, long classNameId)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns a range of all the expando tables where companyId = &#63; and classNameId = &#63;.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param companyId the company ID
124            * @param classNameId the class name ID
125            * @param start the lower bound of the range of expando tables
126            * @param end the upper bound of the range of expando tables (not inclusive)
127            * @return the range of matching expando tables
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
131                    long companyId, long classNameId, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Returns an ordered range of all the expando tables where companyId = &#63; and classNameId = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param companyId the company ID
142            * @param classNameId the class name ID
143            * @param start the lower bound of the range of expando tables
144            * @param end the upper bound of the range of expando tables (not inclusive)
145            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
146            * @return the ordered range of matching expando tables
147            * @throws SystemException if a system exception occurred
148            */
149            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findByC_C(
150                    long companyId, long classNameId, int start, int end,
151                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            /**
155            * Returns the first expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
156            *
157            * @param companyId the company ID
158            * @param classNameId the class name ID
159            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
160            * @return the first matching expando table
161            * @throws com.liferay.portlet.expando.NoSuchTableException if a matching expando table could not be found
162            * @throws SystemException if a system exception occurred
163            */
164            public com.liferay.portlet.expando.model.ExpandoTable findByC_C_First(
165                    long companyId, long classNameId,
166                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167                    throws com.liferay.portal.kernel.exception.SystemException,
168                            com.liferay.portlet.expando.NoSuchTableException;
169    
170            /**
171            * Returns the first expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
172            *
173            * @param companyId the company ID
174            * @param classNameId the class name ID
175            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
176            * @return the first matching expando table, or <code>null</code> if a matching expando table could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_First(
180                    long companyId, long classNameId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Returns the last expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
186            *
187            * @param companyId the company ID
188            * @param classNameId the class name ID
189            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
190            * @return the last matching expando table
191            * @throws com.liferay.portlet.expando.NoSuchTableException if a matching expando table could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public com.liferay.portlet.expando.model.ExpandoTable findByC_C_Last(
195                    long companyId, long classNameId,
196                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197                    throws com.liferay.portal.kernel.exception.SystemException,
198                            com.liferay.portlet.expando.NoSuchTableException;
199    
200            /**
201            * Returns the last expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
202            *
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 last matching expando table, or <code>null</code> if a matching expando table could not be found
207            * @throws SystemException if a system exception occurred
208            */
209            public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_Last(
210                    long companyId, long classNameId,
211                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212                    throws com.liferay.portal.kernel.exception.SystemException;
213    
214            /**
215            * Returns the expando tables before and after the current expando table in the ordered set where companyId = &#63; and classNameId = &#63;.
216            *
217            * @param tableId the primary key of the current expando table
218            * @param companyId the company ID
219            * @param classNameId the class name ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the previous, current, and next expando table
222            * @throws com.liferay.portlet.expando.NoSuchTableException if a expando table with the primary key could not be found
223            * @throws SystemException if a system exception occurred
224            */
225            public com.liferay.portlet.expando.model.ExpandoTable[] findByC_C_PrevAndNext(
226                    long tableId, long companyId, long classNameId,
227                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
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 throws a {@link com.liferay.portlet.expando.NoSuchTableException} if it could not be found.
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
238            * @throws com.liferay.portlet.expando.NoSuchTableException if a matching expando table could not be found
239            * @throws SystemException if a system exception occurred
240            */
241            public com.liferay.portlet.expando.model.ExpandoTable findByC_C_N(
242                    long companyId, long classNameId, java.lang.String name)
243                    throws com.liferay.portal.kernel.exception.SystemException,
244                            com.liferay.portlet.expando.NoSuchTableException;
245    
246            /**
247            * 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.
248            *
249            * @param companyId the company ID
250            * @param classNameId the class name ID
251            * @param name the name
252            * @return the matching expando table, or <code>null</code> if a matching expando table could not be found
253            * @throws SystemException if a system exception occurred
254            */
255            public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N(
256                    long companyId, long classNameId, java.lang.String name)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * 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.
261            *
262            * @param companyId the company ID
263            * @param classNameId the class name ID
264            * @param name the name
265            * @param retrieveFromCache whether to use the finder cache
266            * @return the matching expando table, or <code>null</code> if a matching expando table could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N(
270                    long companyId, long classNameId, java.lang.String name,
271                    boolean retrieveFromCache)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * Returns all the expando tables.
276            *
277            * @return the expando tables
278            * @throws SystemException if a system exception occurred
279            */
280            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll()
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            /**
284            * Returns a range of all the expando tables.
285            *
286            * <p>
287            * 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.
288            * </p>
289            *
290            * @param start the lower bound of the range of expando tables
291            * @param end the upper bound of the range of expando tables (not inclusive)
292            * @return the range of expando tables
293            * @throws SystemException if a system exception occurred
294            */
295            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll(
296                    int start, int end)
297                    throws com.liferay.portal.kernel.exception.SystemException;
298    
299            /**
300            * Returns an ordered range of all the expando tables.
301            *
302            * <p>
303            * 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.
304            * </p>
305            *
306            * @param start the lower bound of the range of expando tables
307            * @param end the upper bound of the range of expando tables (not inclusive)
308            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
309            * @return the ordered range of expando tables
310            * @throws SystemException if a system exception occurred
311            */
312            public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll(
313                    int start, int end,
314                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            /**
318            * Removes all the expando tables where companyId = &#63; and classNameId = &#63; from the database.
319            *
320            * @param companyId the company ID
321            * @param classNameId the class name ID
322            * @throws SystemException if a system exception occurred
323            */
324            public void removeByC_C(long companyId, long classNameId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * Removes the expando table where companyId = &#63; and classNameId = &#63; and name = &#63; from the database.
329            *
330            * @param companyId the company ID
331            * @param classNameId the class name ID
332            * @param name the name
333            * @return the expando table that was removed
334            * @throws SystemException if a system exception occurred
335            */
336            public com.liferay.portlet.expando.model.ExpandoTable removeByC_C_N(
337                    long companyId, long classNameId, java.lang.String name)
338                    throws com.liferay.portal.kernel.exception.SystemException,
339                            com.liferay.portlet.expando.NoSuchTableException;
340    
341            /**
342            * Removes all the expando tables from the database.
343            *
344            * @throws SystemException if a system exception occurred
345            */
346            public void removeAll()
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            /**
350            * Returns the number of expando tables where companyId = &#63; and classNameId = &#63;.
351            *
352            * @param companyId the company ID
353            * @param classNameId the class name ID
354            * @return the number of matching expando tables
355            * @throws SystemException if a system exception occurred
356            */
357            public int countByC_C(long companyId, long classNameId)
358                    throws com.liferay.portal.kernel.exception.SystemException;
359    
360            /**
361            * Returns the number of expando tables where companyId = &#63; and classNameId = &#63; and name = &#63;.
362            *
363            * @param companyId the company ID
364            * @param classNameId the class name ID
365            * @param name the name
366            * @return the number of matching expando tables
367            * @throws SystemException if a system exception occurred
368            */
369            public int countByC_C_N(long companyId, long classNameId,
370                    java.lang.String name)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            /**
374            * Returns the number of expando tables.
375            *
376            * @return the number of expando tables
377            * @throws SystemException if a system exception occurred
378            */
379            public int countAll()
380                    throws com.liferay.portal.kernel.exception.SystemException;
381    }