001    /**
002     * Copyright (c) 2000-2013 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.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.ListType;
020    
021    /**
022     * The persistence interface for the list type service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ListTypePersistenceImpl
030     * @see ListTypeUtil
031     * @generated
032     */
033    @ProviderType
034    public interface ListTypePersistence extends BasePersistence<ListType> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link ListTypeUtil} to access the list type persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the list types where type = &#63;.
043            *
044            * @param type the type
045            * @return the matching list types
046            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.ListType> findByType(
049                    java.lang.String type)
050                    throws com.liferay.portal.kernel.exception.SystemException;
051    
052            /**
053            * Returns a range of all the list types where type = &#63;.
054            *
055            * <p>
056            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ListTypeModelImpl}. 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.
057            * </p>
058            *
059            * @param type the type
060            * @param start the lower bound of the range of list types
061            * @param end the upper bound of the range of list types (not inclusive)
062            * @return the range of matching list types
063            * @throws SystemException if a system exception occurred
064            */
065            public java.util.List<com.liferay.portal.model.ListType> findByType(
066                    java.lang.String type, int start, int end)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns an ordered range of all the list types where type = &#63;.
071            *
072            * <p>
073            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ListTypeModelImpl}. 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.
074            * </p>
075            *
076            * @param type the type
077            * @param start the lower bound of the range of list types
078            * @param end the upper bound of the range of list types (not inclusive)
079            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
080            * @return the ordered range of matching list types
081            * @throws SystemException if a system exception occurred
082            */
083            public java.util.List<com.liferay.portal.model.ListType> findByType(
084                    java.lang.String type, int start, int end,
085                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Returns the first list type in the ordered set where type = &#63;.
090            *
091            * @param type the type
092            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
093            * @return the first matching list type
094            * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.ListType findByType_First(
098                    java.lang.String type,
099                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
100                    throws com.liferay.portal.NoSuchListTypeException,
101                            com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Returns the first list type in the ordered set where type = &#63;.
105            *
106            * @param type the type
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the first matching list type, or <code>null</code> if a matching list type could not be found
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.ListType fetchByType_First(
112                    java.lang.String type,
113                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns the last list type in the ordered set where type = &#63;.
118            *
119            * @param type the type
120            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
121            * @return the last matching list type
122            * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found
123            * @throws SystemException if a system exception occurred
124            */
125            public com.liferay.portal.model.ListType findByType_Last(
126                    java.lang.String type,
127                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
128                    throws com.liferay.portal.NoSuchListTypeException,
129                            com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Returns the last list type in the ordered set where type = &#63;.
133            *
134            * @param type the type
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the last matching list type, or <code>null</code> if a matching list type could not be found
137            * @throws SystemException if a system exception occurred
138            */
139            public com.liferay.portal.model.ListType fetchByType_Last(
140                    java.lang.String type,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Returns the list types before and after the current list type in the ordered set where type = &#63;.
146            *
147            * @param listTypeId the primary key of the current list type
148            * @param type the type
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next list type
151            * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.ListType[] findByType_PrevAndNext(
155                    int listTypeId, java.lang.String type,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchListTypeException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Removes all the list types where type = &#63; from the database.
162            *
163            * @param type the type
164            * @throws SystemException if a system exception occurred
165            */
166            public void removeByType(java.lang.String type)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Returns the number of list types where type = &#63;.
171            *
172            * @param type the type
173            * @return the number of matching list types
174            * @throws SystemException if a system exception occurred
175            */
176            public int countByType(java.lang.String type)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Caches the list type in the entity cache if it is enabled.
181            *
182            * @param listType the list type
183            */
184            public void cacheResult(com.liferay.portal.model.ListType listType);
185    
186            /**
187            * Caches the list types in the entity cache if it is enabled.
188            *
189            * @param listTypes the list types
190            */
191            public void cacheResult(
192                    java.util.List<com.liferay.portal.model.ListType> listTypes);
193    
194            /**
195            * Creates a new list type with the primary key. Does not add the list type to the database.
196            *
197            * @param listTypeId the primary key for the new list type
198            * @return the new list type
199            */
200            public com.liferay.portal.model.ListType create(int listTypeId);
201    
202            /**
203            * Removes the list type with the primary key from the database. Also notifies the appropriate model listeners.
204            *
205            * @param listTypeId the primary key of the list type
206            * @return the list type that was removed
207            * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portal.model.ListType remove(int listTypeId)
211                    throws com.liferay.portal.NoSuchListTypeException,
212                            com.liferay.portal.kernel.exception.SystemException;
213    
214            public com.liferay.portal.model.ListType updateImpl(
215                    com.liferay.portal.model.ListType listType)
216                    throws com.liferay.portal.kernel.exception.SystemException;
217    
218            /**
219            * Returns the list type with the primary key or throws a {@link com.liferay.portal.NoSuchListTypeException} if it could not be found.
220            *
221            * @param listTypeId the primary key of the list type
222            * @return the list type
223            * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public com.liferay.portal.model.ListType findByPrimaryKey(int listTypeId)
227                    throws com.liferay.portal.NoSuchListTypeException,
228                            com.liferay.portal.kernel.exception.SystemException;
229    
230            /**
231            * Returns the list type with the primary key or returns <code>null</code> if it could not be found.
232            *
233            * @param listTypeId the primary key of the list type
234            * @return the list type, or <code>null</code> if a list type with the primary key could not be found
235            * @throws SystemException if a system exception occurred
236            */
237            public com.liferay.portal.model.ListType fetchByPrimaryKey(int listTypeId)
238                    throws com.liferay.portal.kernel.exception.SystemException;
239    
240            /**
241            * Returns all the list types.
242            *
243            * @return the list types
244            * @throws SystemException if a system exception occurred
245            */
246            public java.util.List<com.liferay.portal.model.ListType> findAll()
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns a range of all the list types.
251            *
252            * <p>
253            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ListTypeModelImpl}. 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.
254            * </p>
255            *
256            * @param start the lower bound of the range of list types
257            * @param end the upper bound of the range of list types (not inclusive)
258            * @return the range of list types
259            * @throws SystemException if a system exception occurred
260            */
261            public java.util.List<com.liferay.portal.model.ListType> findAll(
262                    int start, int end)
263                    throws com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * Returns an ordered range of all the list types.
267            *
268            * <p>
269            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ListTypeModelImpl}. 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.
270            * </p>
271            *
272            * @param start the lower bound of the range of list types
273            * @param end the upper bound of the range of list types (not inclusive)
274            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
275            * @return the ordered range of list types
276            * @throws SystemException if a system exception occurred
277            */
278            public java.util.List<com.liferay.portal.model.ListType> findAll(
279                    int start, int end,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            /**
284            * Removes all the list types from the database.
285            *
286            * @throws SystemException if a system exception occurred
287            */
288            public void removeAll()
289                    throws com.liferay.portal.kernel.exception.SystemException;
290    
291            /**
292            * Returns the number of list types.
293            *
294            * @return the number of list types
295            * @throws SystemException if a system exception occurred
296            */
297            public int countAll()
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    }