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.Release;
020    
021    /**
022     * The persistence interface for the release 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 ReleasePersistenceImpl
030     * @see ReleaseUtil
031     * @generated
032     */
033    @ProviderType
034    public interface ReleasePersistence extends BasePersistence<Release> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link ReleaseUtil} to access the release persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns the release where servletContextName = &#63; or throws a {@link com.liferay.portal.NoSuchReleaseException} if it could not be found.
043            *
044            * @param servletContextName the servlet context name
045            * @return the matching release
046            * @throws com.liferay.portal.NoSuchReleaseException if a matching release could not be found
047            * @throws SystemException if a system exception occurred
048            */
049            public com.liferay.portal.model.Release findByServletContextName(
050                    java.lang.String servletContextName)
051                    throws com.liferay.portal.NoSuchReleaseException,
052                            com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Returns the release where servletContextName = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
056            *
057            * @param servletContextName the servlet context name
058            * @return the matching release, or <code>null</code> if a matching release could not be found
059            * @throws SystemException if a system exception occurred
060            */
061            public com.liferay.portal.model.Release fetchByServletContextName(
062                    java.lang.String servletContextName)
063                    throws com.liferay.portal.kernel.exception.SystemException;
064    
065            /**
066            * Returns the release where servletContextName = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
067            *
068            * @param servletContextName the servlet context name
069            * @param retrieveFromCache whether to use the finder cache
070            * @return the matching release, or <code>null</code> if a matching release could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.Release fetchByServletContextName(
074                    java.lang.String servletContextName, boolean retrieveFromCache)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Removes the release where servletContextName = &#63; from the database.
079            *
080            * @param servletContextName the servlet context name
081            * @return the release that was removed
082            * @throws SystemException if a system exception occurred
083            */
084            public com.liferay.portal.model.Release removeByServletContextName(
085                    java.lang.String servletContextName)
086                    throws com.liferay.portal.NoSuchReleaseException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            /**
090            * Returns the number of releases where servletContextName = &#63;.
091            *
092            * @param servletContextName the servlet context name
093            * @return the number of matching releases
094            * @throws SystemException if a system exception occurred
095            */
096            public int countByServletContextName(java.lang.String servletContextName)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            /**
100            * Caches the release in the entity cache if it is enabled.
101            *
102            * @param release the release
103            */
104            public void cacheResult(com.liferay.portal.model.Release release);
105    
106            /**
107            * Caches the releases in the entity cache if it is enabled.
108            *
109            * @param releases the releases
110            */
111            public void cacheResult(
112                    java.util.List<com.liferay.portal.model.Release> releases);
113    
114            /**
115            * Creates a new release with the primary key. Does not add the release to the database.
116            *
117            * @param releaseId the primary key for the new release
118            * @return the new release
119            */
120            public com.liferay.portal.model.Release create(long releaseId);
121    
122            /**
123            * Removes the release with the primary key from the database. Also notifies the appropriate model listeners.
124            *
125            * @param releaseId the primary key of the release
126            * @return the release that was removed
127            * @throws com.liferay.portal.NoSuchReleaseException if a release with the primary key could not be found
128            * @throws SystemException if a system exception occurred
129            */
130            public com.liferay.portal.model.Release remove(long releaseId)
131                    throws com.liferay.portal.NoSuchReleaseException,
132                            com.liferay.portal.kernel.exception.SystemException;
133    
134            public com.liferay.portal.model.Release updateImpl(
135                    com.liferay.portal.model.Release release)
136                    throws com.liferay.portal.kernel.exception.SystemException;
137    
138            /**
139            * Returns the release with the primary key or throws a {@link com.liferay.portal.NoSuchReleaseException} if it could not be found.
140            *
141            * @param releaseId the primary key of the release
142            * @return the release
143            * @throws com.liferay.portal.NoSuchReleaseException if a release with the primary key could not be found
144            * @throws SystemException if a system exception occurred
145            */
146            public com.liferay.portal.model.Release findByPrimaryKey(long releaseId)
147                    throws com.liferay.portal.NoSuchReleaseException,
148                            com.liferay.portal.kernel.exception.SystemException;
149    
150            /**
151            * Returns the release with the primary key or returns <code>null</code> if it could not be found.
152            *
153            * @param releaseId the primary key of the release
154            * @return the release, or <code>null</code> if a release with the primary key could not be found
155            * @throws SystemException if a system exception occurred
156            */
157            public com.liferay.portal.model.Release fetchByPrimaryKey(long releaseId)
158                    throws com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Returns all the releases.
162            *
163            * @return the releases
164            * @throws SystemException if a system exception occurred
165            */
166            public java.util.List<com.liferay.portal.model.Release> findAll()
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Returns a range of all the releases.
171            *
172            * <p>
173            * 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.ReleaseModelImpl}. 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.
174            * </p>
175            *
176            * @param start the lower bound of the range of releases
177            * @param end the upper bound of the range of releases (not inclusive)
178            * @return the range of releases
179            * @throws SystemException if a system exception occurred
180            */
181            public java.util.List<com.liferay.portal.model.Release> findAll(int start,
182                    int end) throws com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Returns an ordered range of all the releases.
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. 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.ReleaseModelImpl}. 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.
189            * </p>
190            *
191            * @param start the lower bound of the range of releases
192            * @param end the upper bound of the range of releases (not inclusive)
193            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
194            * @return the ordered range of releases
195            * @throws SystemException if a system exception occurred
196            */
197            public java.util.List<com.liferay.portal.model.Release> findAll(int start,
198                    int end,
199                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
200                    throws com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * Removes all the releases from the database.
204            *
205            * @throws SystemException if a system exception occurred
206            */
207            public void removeAll()
208                    throws com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Returns the number of releases.
212            *
213            * @return the number of releases
214            * @throws SystemException if a system exception occurred
215            */
216            public int countAll()
217                    throws com.liferay.portal.kernel.exception.SystemException;
218    }