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