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.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            */
047            public java.util.List<com.liferay.portal.model.ListType> findByType(
048                    java.lang.String type);
049    
050            /**
051            * Returns a range of all the list types where type = &#63;.
052            *
053            * <p>
054            * 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.
055            * </p>
056            *
057            * @param type the type
058            * @param start the lower bound of the range of list types
059            * @param end the upper bound of the range of list types (not inclusive)
060            * @return the range of matching list types
061            */
062            public java.util.List<com.liferay.portal.model.ListType> findByType(
063                    java.lang.String type, int start, int end);
064    
065            /**
066            * Returns an ordered range of all the list types where type = &#63;.
067            *
068            * <p>
069            * 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.
070            * </p>
071            *
072            * @param type the type
073            * @param start the lower bound of the range of list types
074            * @param end the upper bound of the range of list types (not inclusive)
075            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
076            * @return the ordered range of matching list types
077            */
078            public java.util.List<com.liferay.portal.model.ListType> findByType(
079                    java.lang.String type, int start, int end,
080                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator);
081    
082            /**
083            * Returns the first list type in the ordered set where type = &#63;.
084            *
085            * @param type the type
086            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
087            * @return the first matching list type
088            * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found
089            */
090            public com.liferay.portal.model.ListType findByType_First(
091                    java.lang.String type,
092                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator)
093                    throws com.liferay.portal.NoSuchListTypeException;
094    
095            /**
096            * Returns the first list type in the ordered set where type = &#63;.
097            *
098            * @param type the type
099            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
100            * @return the first matching list type, or <code>null</code> if a matching list type could not be found
101            */
102            public com.liferay.portal.model.ListType fetchByType_First(
103                    java.lang.String type,
104                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator);
105    
106            /**
107            * Returns the last list type in the ordered set where type = &#63;.
108            *
109            * @param type the type
110            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
111            * @return the last matching list type
112            * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found
113            */
114            public com.liferay.portal.model.ListType findByType_Last(
115                    java.lang.String type,
116                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator)
117                    throws com.liferay.portal.NoSuchListTypeException;
118    
119            /**
120            * Returns the last list type in the ordered set where type = &#63;.
121            *
122            * @param type the type
123            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
124            * @return the last matching list type, or <code>null</code> if a matching list type could not be found
125            */
126            public com.liferay.portal.model.ListType fetchByType_Last(
127                    java.lang.String type,
128                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator);
129    
130            /**
131            * Returns the list types before and after the current list type in the ordered set where type = &#63;.
132            *
133            * @param listTypeId the primary key of the current list type
134            * @param type the type
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the previous, current, and next list type
137            * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found
138            */
139            public com.liferay.portal.model.ListType[] findByType_PrevAndNext(
140                    int listTypeId, java.lang.String type,
141                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator)
142                    throws com.liferay.portal.NoSuchListTypeException;
143    
144            /**
145            * Removes all the list types where type = &#63; from the database.
146            *
147            * @param type the type
148            */
149            public void removeByType(java.lang.String type);
150    
151            /**
152            * Returns the number of list types where type = &#63;.
153            *
154            * @param type the type
155            * @return the number of matching list types
156            */
157            public int countByType(java.lang.String type);
158    
159            /**
160            * Caches the list type in the entity cache if it is enabled.
161            *
162            * @param listType the list type
163            */
164            public void cacheResult(com.liferay.portal.model.ListType listType);
165    
166            /**
167            * Caches the list types in the entity cache if it is enabled.
168            *
169            * @param listTypes the list types
170            */
171            public void cacheResult(
172                    java.util.List<com.liferay.portal.model.ListType> listTypes);
173    
174            /**
175            * Creates a new list type with the primary key. Does not add the list type to the database.
176            *
177            * @param listTypeId the primary key for the new list type
178            * @return the new list type
179            */
180            public com.liferay.portal.model.ListType create(int listTypeId);
181    
182            /**
183            * Removes the list type with the primary key from the database. Also notifies the appropriate model listeners.
184            *
185            * @param listTypeId the primary key of the list type
186            * @return the list type that was removed
187            * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found
188            */
189            public com.liferay.portal.model.ListType remove(int listTypeId)
190                    throws com.liferay.portal.NoSuchListTypeException;
191    
192            public com.liferay.portal.model.ListType updateImpl(
193                    com.liferay.portal.model.ListType listType);
194    
195            /**
196            * Returns the list type with the primary key or throws a {@link com.liferay.portal.NoSuchListTypeException} if it could not be found.
197            *
198            * @param listTypeId the primary key of the list type
199            * @return the list type
200            * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found
201            */
202            public com.liferay.portal.model.ListType findByPrimaryKey(int listTypeId)
203                    throws com.liferay.portal.NoSuchListTypeException;
204    
205            /**
206            * Returns the list type with the primary key or returns <code>null</code> if it could not be found.
207            *
208            * @param listTypeId the primary key of the list type
209            * @return the list type, or <code>null</code> if a list type with the primary key could not be found
210            */
211            public com.liferay.portal.model.ListType fetchByPrimaryKey(int listTypeId);
212    
213            @Override
214            public java.util.Map<java.io.Serializable, com.liferay.portal.model.ListType> fetchByPrimaryKeys(
215                    java.util.Set<java.io.Serializable> primaryKeys);
216    
217            /**
218            * Returns all the list types.
219            *
220            * @return the list types
221            */
222            public java.util.List<com.liferay.portal.model.ListType> findAll();
223    
224            /**
225            * Returns a range of all the list types.
226            *
227            * <p>
228            * 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.
229            * </p>
230            *
231            * @param start the lower bound of the range of list types
232            * @param end the upper bound of the range of list types (not inclusive)
233            * @return the range of list types
234            */
235            public java.util.List<com.liferay.portal.model.ListType> findAll(
236                    int start, int end);
237    
238            /**
239            * Returns an ordered range of all the list types.
240            *
241            * <p>
242            * 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.
243            * </p>
244            *
245            * @param start the lower bound of the range of list types
246            * @param end the upper bound of the range of list types (not inclusive)
247            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
248            * @return the ordered range of list types
249            */
250            public java.util.List<com.liferay.portal.model.ListType> findAll(
251                    int start, int end,
252                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ListType> orderByComparator);
253    
254            /**
255            * Removes all the list types from the database.
256            */
257            public void removeAll();
258    
259            /**
260            * Returns the number of list types.
261            *
262            * @return the number of list types
263            */
264            public int countAll();
265    }