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