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