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