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