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; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for Release. This utility wraps 024 * {@link com.liferay.portal.service.impl.ReleaseLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see ReleaseLocalService 032 * @see com.liferay.portal.service.base.ReleaseLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.ReleaseLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class ReleaseLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ReleaseLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the release to the database. Also notifies the appropriate model listeners. 046 * 047 * @param release the release 048 * @return the release that was added 049 */ 050 public static com.liferay.portal.kernel.model.Release addRelease( 051 com.liferay.portal.kernel.model.Release release) { 052 return getService().addRelease(release); 053 } 054 055 public static com.liferay.portal.kernel.model.Release addRelease( 056 java.lang.String servletContextName, int buildNumber) { 057 return getService().addRelease(servletContextName, buildNumber); 058 } 059 060 public static com.liferay.portal.kernel.model.Release addRelease( 061 java.lang.String servletContextName, java.lang.String schemaVersion) { 062 return getService().addRelease(servletContextName, schemaVersion); 063 } 064 065 /** 066 * Creates a new release with the primary key. Does not add the release to the database. 067 * 068 * @param releaseId the primary key for the new release 069 * @return the new release 070 */ 071 public static com.liferay.portal.kernel.model.Release createRelease( 072 long releaseId) { 073 return getService().createRelease(releaseId); 074 } 075 076 public static void createTablesAndPopulate() { 077 getService().createTablesAndPopulate(); 078 } 079 080 /** 081 * @throws PortalException 082 */ 083 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 084 com.liferay.portal.kernel.model.PersistedModel persistedModel) 085 throws com.liferay.portal.kernel.exception.PortalException { 086 return getService().deletePersistedModel(persistedModel); 087 } 088 089 /** 090 * Deletes the release from the database. Also notifies the appropriate model listeners. 091 * 092 * @param release the release 093 * @return the release that was removed 094 */ 095 public static com.liferay.portal.kernel.model.Release deleteRelease( 096 com.liferay.portal.kernel.model.Release release) { 097 return getService().deleteRelease(release); 098 } 099 100 /** 101 * Deletes the release with the primary key from the database. Also notifies the appropriate model listeners. 102 * 103 * @param releaseId the primary key of the release 104 * @return the release that was removed 105 * @throws PortalException if a release with the primary key could not be found 106 */ 107 public static com.liferay.portal.kernel.model.Release deleteRelease( 108 long releaseId) 109 throws com.liferay.portal.kernel.exception.PortalException { 110 return getService().deleteRelease(releaseId); 111 } 112 113 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 114 return getService().dynamicQuery(); 115 } 116 117 /** 118 * Performs a dynamic query on the database and returns the matching rows. 119 * 120 * @param dynamicQuery the dynamic query 121 * @return the matching rows 122 */ 123 public static <T> java.util.List<T> dynamicQuery( 124 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 125 return getService().dynamicQuery(dynamicQuery); 126 } 127 128 /** 129 * Performs a dynamic query on the database and returns a range of the matching rows. 130 * 131 * <p> 132 * 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. 133 * </p> 134 * 135 * @param dynamicQuery the dynamic query 136 * @param start the lower bound of the range of model instances 137 * @param end the upper bound of the range of model instances (not inclusive) 138 * @return the range of matching rows 139 */ 140 public static <T> java.util.List<T> dynamicQuery( 141 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 142 int end) { 143 return getService().dynamicQuery(dynamicQuery, start, end); 144 } 145 146 /** 147 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 148 * 149 * <p> 150 * 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. 151 * </p> 152 * 153 * @param dynamicQuery the dynamic query 154 * @param start the lower bound of the range of model instances 155 * @param end the upper bound of the range of model instances (not inclusive) 156 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 157 * @return the ordered range of matching rows 158 */ 159 public static <T> java.util.List<T> dynamicQuery( 160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 161 int end, 162 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 163 return getService() 164 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 165 } 166 167 /** 168 * Returns the number of rows matching the dynamic query. 169 * 170 * @param dynamicQuery the dynamic query 171 * @return the number of rows matching the dynamic query 172 */ 173 public static long dynamicQueryCount( 174 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 175 return getService().dynamicQueryCount(dynamicQuery); 176 } 177 178 /** 179 * Returns the number of rows matching the dynamic query. 180 * 181 * @param dynamicQuery the dynamic query 182 * @param projection the projection to apply to the query 183 * @return the number of rows matching the dynamic query 184 */ 185 public static long dynamicQueryCount( 186 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 187 com.liferay.portal.kernel.dao.orm.Projection projection) { 188 return getService().dynamicQueryCount(dynamicQuery, projection); 189 } 190 191 public static com.liferay.portal.kernel.model.Release fetchRelease( 192 long releaseId) { 193 return getService().fetchRelease(releaseId); 194 } 195 196 public static com.liferay.portal.kernel.model.Release fetchRelease( 197 java.lang.String servletContextName) { 198 return getService().fetchRelease(servletContextName); 199 } 200 201 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 202 return getService().getActionableDynamicQuery(); 203 } 204 205 public static int getBuildNumberOrCreate() 206 throws com.liferay.portal.kernel.exception.PortalException { 207 return getService().getBuildNumberOrCreate(); 208 } 209 210 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 211 return getService().getIndexableActionableDynamicQuery(); 212 } 213 214 /** 215 * Returns the OSGi service identifier. 216 * 217 * @return the OSGi service identifier 218 */ 219 public static java.lang.String getOSGiServiceIdentifier() { 220 return getService().getOSGiServiceIdentifier(); 221 } 222 223 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 224 java.io.Serializable primaryKeyObj) 225 throws com.liferay.portal.kernel.exception.PortalException { 226 return getService().getPersistedModel(primaryKeyObj); 227 } 228 229 /** 230 * Returns the release with the primary key. 231 * 232 * @param releaseId the primary key of the release 233 * @return the release 234 * @throws PortalException if a release with the primary key could not be found 235 */ 236 public static com.liferay.portal.kernel.model.Release getRelease( 237 long releaseId) 238 throws com.liferay.portal.kernel.exception.PortalException { 239 return getService().getRelease(releaseId); 240 } 241 242 /** 243 * Returns a range of all the releases. 244 * 245 * <p> 246 * 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. 247 * </p> 248 * 249 * @param start the lower bound of the range of releases 250 * @param end the upper bound of the range of releases (not inclusive) 251 * @return the range of releases 252 */ 253 public static java.util.List<com.liferay.portal.kernel.model.Release> getReleases( 254 int start, int end) { 255 return getService().getReleases(start, end); 256 } 257 258 /** 259 * Returns the number of releases. 260 * 261 * @return the number of releases 262 */ 263 public static int getReleasesCount() { 264 return getService().getReleasesCount(); 265 } 266 267 /** 268 * Updates the release in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 269 * 270 * @param release the release 271 * @return the release that was updated 272 */ 273 public static com.liferay.portal.kernel.model.Release updateRelease( 274 com.liferay.portal.kernel.model.Release release) { 275 return getService().updateRelease(release); 276 } 277 278 public static com.liferay.portal.kernel.model.Release updateRelease( 279 long releaseId, int buildNumber, java.util.Date buildDate, 280 boolean verified) 281 throws com.liferay.portal.kernel.exception.PortalException { 282 return getService() 283 .updateRelease(releaseId, buildNumber, buildDate, verified); 284 } 285 286 public static void updateRelease(java.lang.String servletContextName, 287 java.lang.String schemaVersion, java.lang.String previousSchemaVersion) { 288 getService() 289 .updateRelease(servletContextName, schemaVersion, 290 previousSchemaVersion); 291 } 292 293 public static void updateRelease(java.lang.String servletContextName, 294 java.util.List<com.liferay.portal.kernel.upgrade.UpgradeProcess> upgradeProcesses, 295 int buildNumber, int previousBuildNumber, boolean indexOnUpgrade) 296 throws com.liferay.portal.kernel.exception.PortalException { 297 getService() 298 .updateRelease(servletContextName, upgradeProcesses, buildNumber, 299 previousBuildNumber, indexOnUpgrade); 300 } 301 302 public static void updateRelease(java.lang.String servletContextName, 303 java.util.List<com.liferay.portal.kernel.upgrade.UpgradeProcess> upgradeProcesses, 304 java.util.Properties unfilteredPortalProperties) 305 throws java.lang.Exception { 306 getService() 307 .updateRelease(servletContextName, upgradeProcesses, 308 unfilteredPortalProperties); 309 } 310 311 public static ReleaseLocalService getService() { 312 if (_service == null) { 313 _service = (ReleaseLocalService)PortalBeanLocatorUtil.locate(ReleaseLocalService.class.getName()); 314 315 ReferenceRegistry.registerReference(ReleaseLocalServiceUtil.class, 316 "_service"); 317 } 318 319 return _service; 320 } 321 322 private static ReleaseLocalService _service; 323 }