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