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