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