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.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 RepositoryEntry. This utility wraps 024 * {@link com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl} 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 RepositoryEntryLocalService 032 * @see com.liferay.portal.service.base.RepositoryEntryLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class RepositoryEntryLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the repository entry to the database. Also notifies the appropriate model listeners. 046 * 047 * @param repositoryEntry the repository entry 048 * @return the repository entry that was added 049 */ 050 public static com.liferay.portal.model.RepositoryEntry addRepositoryEntry( 051 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 052 return getService().addRepositoryEntry(repositoryEntry); 053 } 054 055 public static com.liferay.portal.model.RepositoryEntry addRepositoryEntry( 056 long userId, long groupId, long repositoryId, 057 java.lang.String mappedId, 058 com.liferay.portal.service.ServiceContext serviceContext) 059 throws com.liferay.portal.kernel.exception.PortalException { 060 return getService() 061 .addRepositoryEntry(userId, groupId, repositoryId, mappedId, 062 serviceContext); 063 } 064 065 /** 066 * Creates a new repository entry with the primary key. Does not add the repository entry to the database. 067 * 068 * @param repositoryEntryId the primary key for the new repository entry 069 * @return the new repository entry 070 */ 071 public static com.liferay.portal.model.RepositoryEntry createRepositoryEntry( 072 long repositoryEntryId) { 073 return getService().createRepositoryEntry(repositoryEntryId); 074 } 075 076 /** 077 * @throws PortalException 078 */ 079 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 080 com.liferay.portal.model.PersistedModel persistedModel) 081 throws com.liferay.portal.kernel.exception.PortalException { 082 return getService().deletePersistedModel(persistedModel); 083 } 084 085 /** 086 * Deletes the repository entry from the database. Also notifies the appropriate model listeners. 087 * 088 * @param repositoryEntry the repository entry 089 * @return the repository entry that was removed 090 */ 091 public static com.liferay.portal.model.RepositoryEntry deleteRepositoryEntry( 092 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 093 return getService().deleteRepositoryEntry(repositoryEntry); 094 } 095 096 /** 097 * Deletes the repository entry with the primary key from the database. Also notifies the appropriate model listeners. 098 * 099 * @param repositoryEntryId the primary key of the repository entry 100 * @return the repository entry that was removed 101 * @throws PortalException if a repository entry with the primary key could not be found 102 */ 103 public static com.liferay.portal.model.RepositoryEntry deleteRepositoryEntry( 104 long repositoryEntryId) 105 throws com.liferay.portal.kernel.exception.PortalException { 106 return getService().deleteRepositoryEntry(repositoryEntryId); 107 } 108 109 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 110 return getService().dynamicQuery(); 111 } 112 113 /** 114 * Performs a dynamic query on the database and returns the matching rows. 115 * 116 * @param dynamicQuery the dynamic query 117 * @return the matching rows 118 */ 119 public static <T> java.util.List<T> dynamicQuery( 120 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 121 return getService().dynamicQuery(dynamicQuery); 122 } 123 124 /** 125 * Performs a dynamic query on the database and returns a range of the matching rows. 126 * 127 * <p> 128 * 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.RepositoryEntryModelImpl}. 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. 129 * </p> 130 * 131 * @param dynamicQuery the dynamic query 132 * @param start the lower bound of the range of model instances 133 * @param end the upper bound of the range of model instances (not inclusive) 134 * @return the range of matching rows 135 */ 136 public static <T> java.util.List<T> dynamicQuery( 137 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 138 int end) { 139 return getService().dynamicQuery(dynamicQuery, start, end); 140 } 141 142 /** 143 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 144 * 145 * <p> 146 * 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.RepositoryEntryModelImpl}. 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. 147 * </p> 148 * 149 * @param dynamicQuery the dynamic query 150 * @param start the lower bound of the range of model instances 151 * @param end the upper bound of the range of model instances (not inclusive) 152 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 153 * @return the ordered range of matching rows 154 */ 155 public static <T> java.util.List<T> dynamicQuery( 156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 157 int end, 158 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 159 return getService() 160 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 161 } 162 163 /** 164 * Returns the number of rows that match the dynamic query. 165 * 166 * @param dynamicQuery the dynamic query 167 * @return the number of rows that match the dynamic query 168 */ 169 public static long dynamicQueryCount( 170 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 171 return getService().dynamicQueryCount(dynamicQuery); 172 } 173 174 /** 175 * Returns the number of rows that match the dynamic query. 176 * 177 * @param dynamicQuery the dynamic query 178 * @param projection the projection to apply to the query 179 * @return the number of rows that match the dynamic query 180 */ 181 public static long dynamicQueryCount( 182 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 183 com.liferay.portal.kernel.dao.orm.Projection projection) { 184 return getService().dynamicQueryCount(dynamicQuery, projection); 185 } 186 187 public static com.liferay.portal.model.RepositoryEntry fetchRepositoryEntry( 188 long repositoryEntryId) { 189 return getService().fetchRepositoryEntry(repositoryEntryId); 190 } 191 192 /** 193 * Returns the repository entry matching the UUID and group. 194 * 195 * @param uuid the repository entry's UUID 196 * @param groupId the primary key of the group 197 * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found 198 */ 199 public static com.liferay.portal.model.RepositoryEntry fetchRepositoryEntryByUuidAndGroupId( 200 java.lang.String uuid, long groupId) { 201 return getService().fetchRepositoryEntryByUuidAndGroupId(uuid, groupId); 202 } 203 204 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 205 return getService().getActionableDynamicQuery(); 206 } 207 208 /** 209 * Returns the Spring bean ID for this bean. 210 * 211 * @return the Spring bean ID for this bean 212 */ 213 public static java.lang.String getBeanIdentifier() { 214 return getService().getBeanIdentifier(); 215 } 216 217 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 218 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) { 219 return getService().getExportActionableDynamicQuery(portletDataContext); 220 } 221 222 public static com.liferay.portal.model.PersistedModel getPersistedModel( 223 java.io.Serializable primaryKeyObj) 224 throws com.liferay.portal.kernel.exception.PortalException { 225 return getService().getPersistedModel(primaryKeyObj); 226 } 227 228 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries( 229 long repositoryId) { 230 return getService().getRepositoryEntries(repositoryId); 231 } 232 233 /** 234 * Returns a range of all the repository entries. 235 * 236 * <p> 237 * 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.RepositoryEntryModelImpl}. 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. 238 * </p> 239 * 240 * @param start the lower bound of the range of repository entries 241 * @param end the upper bound of the range of repository entries (not inclusive) 242 * @return the range of repository entries 243 */ 244 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries( 245 int start, int end) { 246 return getService().getRepositoryEntries(start, end); 247 } 248 249 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId( 250 java.lang.String uuid, long companyId) { 251 return getService() 252 .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId); 253 } 254 255 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId( 256 java.lang.String uuid, long companyId, int start, int end, 257 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.RepositoryEntry> orderByComparator) { 258 return getService() 259 .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId, 260 start, end, orderByComparator); 261 } 262 263 /** 264 * Returns the number of repository entries. 265 * 266 * @return the number of repository entries 267 */ 268 public static int getRepositoryEntriesCount() { 269 return getService().getRepositoryEntriesCount(); 270 } 271 272 /** 273 * Returns the repository entry with the primary key. 274 * 275 * @param repositoryEntryId the primary key of the repository entry 276 * @return the repository entry 277 * @throws PortalException if a repository entry with the primary key could not be found 278 */ 279 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 280 long repositoryEntryId) 281 throws com.liferay.portal.kernel.exception.PortalException { 282 return getService().getRepositoryEntry(repositoryEntryId); 283 } 284 285 /** 286 * Returns the repository entry matching the UUID and group. 287 * 288 * @param uuid the repository entry's UUID 289 * @param groupId the primary key of the group 290 * @return the matching repository entry 291 * @throws PortalException if a matching repository entry could not be found 292 */ 293 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntryByUuidAndGroupId( 294 java.lang.String uuid, long groupId) 295 throws com.liferay.portal.kernel.exception.PortalException { 296 return getService().getRepositoryEntryByUuidAndGroupId(uuid, groupId); 297 } 298 299 /** 300 * Sets the Spring bean ID for this bean. 301 * 302 * @param beanIdentifier the Spring bean ID for this bean 303 */ 304 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 305 getService().setBeanIdentifier(beanIdentifier); 306 } 307 308 /** 309 * Updates the repository entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 310 * 311 * @param repositoryEntry the repository entry 312 * @return the repository entry that was updated 313 */ 314 public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry( 315 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 316 return getService().updateRepositoryEntry(repositoryEntry); 317 } 318 319 public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry( 320 long repositoryEntryId, java.lang.String mappedId) 321 throws com.liferay.portal.kernel.exception.PortalException { 322 return getService().updateRepositoryEntry(repositoryEntryId, mappedId); 323 } 324 325 public static RepositoryEntryLocalService getService() { 326 if (_service == null) { 327 _service = (RepositoryEntryLocalService)PortalBeanLocatorUtil.locate(RepositoryEntryLocalService.class.getName()); 328 329 ReferenceRegistry.registerReference(RepositoryEntryLocalServiceUtil.class, 330 "_service"); 331 } 332 333 return _service; 334 } 335 336 /** 337 * @deprecated As of 6.2.0 338 */ 339 @Deprecated 340 public void setService(RepositoryEntryLocalService service) { 341 } 342 343 private static RepositoryEntryLocalService _service; 344 }