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