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