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 public static void deleteRepositoryEntries(long repositoryId, 086 java.lang.Iterable<java.lang.String> mappedIds) 087 throws com.liferay.portal.kernel.exception.PortalException { 088 getService().deleteRepositoryEntries(repositoryId, mappedIds); 089 } 090 091 /** 092 * Deletes the repository entry from the database. Also notifies the appropriate model listeners. 093 * 094 * @param repositoryEntry the repository entry 095 * @return the repository entry that was removed 096 */ 097 public static com.liferay.portal.model.RepositoryEntry deleteRepositoryEntry( 098 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 099 return getService().deleteRepositoryEntry(repositoryEntry); 100 } 101 102 /** 103 * Deletes the repository entry with the primary key from the database. Also notifies the appropriate model listeners. 104 * 105 * @param repositoryEntryId the primary key of the repository entry 106 * @return the repository entry that was removed 107 * @throws PortalException if a repository entry with the primary key could not be found 108 */ 109 public static com.liferay.portal.model.RepositoryEntry deleteRepositoryEntry( 110 long repositoryEntryId) 111 throws com.liferay.portal.kernel.exception.PortalException { 112 return getService().deleteRepositoryEntry(repositoryEntryId); 113 } 114 115 public static void deleteRepositoryEntry(long repositoryId, 116 java.lang.String mappedId) 117 throws com.liferay.portal.kernel.exception.PortalException { 118 getService().deleteRepositoryEntry(repositoryId, mappedId); 119 } 120 121 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 122 return getService().dynamicQuery(); 123 } 124 125 /** 126 * Performs a dynamic query on the database and returns the matching rows. 127 * 128 * @param dynamicQuery the dynamic query 129 * @return the matching rows 130 */ 131 public static <T> java.util.List<T> dynamicQuery( 132 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 133 return getService().dynamicQuery(dynamicQuery); 134 } 135 136 /** 137 * Performs a dynamic query on the database and returns a range of the matching rows. 138 * 139 * <p> 140 * 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. 141 * </p> 142 * 143 * @param dynamicQuery the dynamic query 144 * @param start the lower bound of the range of model instances 145 * @param end the upper bound of the range of model instances (not inclusive) 146 * @return the range of matching rows 147 */ 148 public static <T> java.util.List<T> dynamicQuery( 149 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 150 int end) { 151 return getService().dynamicQuery(dynamicQuery, start, end); 152 } 153 154 /** 155 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 156 * 157 * <p> 158 * 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. 159 * </p> 160 * 161 * @param dynamicQuery the dynamic query 162 * @param start the lower bound of the range of model instances 163 * @param end the upper bound of the range of model instances (not inclusive) 164 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 165 * @return the ordered range of matching rows 166 */ 167 public static <T> java.util.List<T> dynamicQuery( 168 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 169 int end, 170 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 171 return getService() 172 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 173 } 174 175 /** 176 * Returns the number of rows matching the dynamic query. 177 * 178 * @param dynamicQuery the dynamic query 179 * @return the number of rows matching the dynamic query 180 */ 181 public static long dynamicQueryCount( 182 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 183 return getService().dynamicQueryCount(dynamicQuery); 184 } 185 186 /** 187 * Returns the number of rows matching the dynamic query. 188 * 189 * @param dynamicQuery the dynamic query 190 * @param projection the projection to apply to the query 191 * @return the number of rows matching the dynamic query 192 */ 193 public static long dynamicQueryCount( 194 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 195 com.liferay.portal.kernel.dao.orm.Projection projection) { 196 return getService().dynamicQueryCount(dynamicQuery, projection); 197 } 198 199 public static com.liferay.portal.model.RepositoryEntry fetchRepositoryEntry( 200 long repositoryEntryId) { 201 return getService().fetchRepositoryEntry(repositoryEntryId); 202 } 203 204 /** 205 * Returns the repository entry matching the UUID and group. 206 * 207 * @param uuid the repository entry's UUID 208 * @param groupId the primary key of the group 209 * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found 210 */ 211 public static com.liferay.portal.model.RepositoryEntry fetchRepositoryEntryByUuidAndGroupId( 212 java.lang.String uuid, long groupId) { 213 return getService().fetchRepositoryEntryByUuidAndGroupId(uuid, groupId); 214 } 215 216 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 217 return getService().getActionableDynamicQuery(); 218 } 219 220 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 221 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 222 return getService().getExportActionableDynamicQuery(portletDataContext); 223 } 224 225 /** 226 * Returns the OSGi service identifier. 227 * 228 * @return the OSGi service identifier 229 */ 230 public static java.lang.String getOSGiServiceIdentifier() { 231 return getService().getOSGiServiceIdentifier(); 232 } 233 234 public static com.liferay.portal.model.PersistedModel getPersistedModel( 235 java.io.Serializable primaryKeyObj) 236 throws com.liferay.portal.kernel.exception.PortalException { 237 return getService().getPersistedModel(primaryKeyObj); 238 } 239 240 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries( 241 long repositoryId) { 242 return getService().getRepositoryEntries(repositoryId); 243 } 244 245 /** 246 * Returns a range of all the repository entries. 247 * 248 * <p> 249 * 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. 250 * </p> 251 * 252 * @param start the lower bound of the range of repository entries 253 * @param end the upper bound of the range of repository entries (not inclusive) 254 * @return the range of repository entries 255 */ 256 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries( 257 int start, int end) { 258 return getService().getRepositoryEntries(start, end); 259 } 260 261 /** 262 * Returns all the repository entries matching the UUID and company. 263 * 264 * @param uuid the UUID of the repository entries 265 * @param companyId the primary key of the company 266 * @return the matching repository entries, or an empty list if no matches were found 267 */ 268 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId( 269 java.lang.String uuid, long companyId) { 270 return getService() 271 .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId); 272 } 273 274 /** 275 * Returns a range of repository entries matching the UUID and company. 276 * 277 * @param uuid the UUID of the repository entries 278 * @param companyId the primary key of the company 279 * @param start the lower bound of the range of repository entries 280 * @param end the upper bound of the range of repository entries (not inclusive) 281 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 282 * @return the range of matching repository entries, or an empty list if no matches were found 283 */ 284 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId( 285 java.lang.String uuid, long companyId, int start, int end, 286 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.RepositoryEntry> orderByComparator) { 287 return getService() 288 .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId, 289 start, end, orderByComparator); 290 } 291 292 /** 293 * Returns the number of repository entries. 294 * 295 * @return the number of repository entries 296 */ 297 public static int getRepositoryEntriesCount() { 298 return getService().getRepositoryEntriesCount(); 299 } 300 301 /** 302 * Returns the repository entry with the primary key. 303 * 304 * @param repositoryEntryId the primary key of the repository entry 305 * @return the repository entry 306 * @throws PortalException if a repository entry with the primary key could not be found 307 */ 308 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 309 long repositoryEntryId) 310 throws com.liferay.portal.kernel.exception.PortalException { 311 return getService().getRepositoryEntry(repositoryEntryId); 312 } 313 314 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 315 long userId, long groupId, long repositoryId, java.lang.String objectId) 316 throws com.liferay.portal.kernel.exception.PortalException { 317 return getService() 318 .getRepositoryEntry(userId, groupId, repositoryId, objectId); 319 } 320 321 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 322 java.lang.String uuid, long groupId) 323 throws com.liferay.portal.kernel.exception.PortalException { 324 return getService().getRepositoryEntry(uuid, groupId); 325 } 326 327 /** 328 * Returns the repository entry matching the UUID and group. 329 * 330 * @param uuid the repository entry's UUID 331 * @param groupId the primary key of the group 332 * @return the matching repository entry 333 * @throws PortalException if a matching repository entry could not be found 334 */ 335 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntryByUuidAndGroupId( 336 java.lang.String uuid, long groupId) 337 throws com.liferay.portal.kernel.exception.PortalException { 338 return getService().getRepositoryEntryByUuidAndGroupId(uuid, groupId); 339 } 340 341 /** 342 * Updates the repository entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 343 * 344 * @param repositoryEntry the repository entry 345 * @return the repository entry that was updated 346 */ 347 public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry( 348 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 349 return getService().updateRepositoryEntry(repositoryEntry); 350 } 351 352 public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry( 353 long repositoryEntryId, java.lang.String mappedId) 354 throws com.liferay.portal.kernel.exception.PortalException { 355 return getService().updateRepositoryEntry(repositoryEntryId, mappedId); 356 } 357 358 public static RepositoryEntryLocalService getService() { 359 if (_service == null) { 360 _service = (RepositoryEntryLocalService)PortalBeanLocatorUtil.locate(RepositoryEntryLocalService.class.getName()); 361 362 ReferenceRegistry.registerReference(RepositoryEntryLocalServiceUtil.class, 363 "_service"); 364 } 365 366 return _service; 367 } 368 369 /** 370 * @deprecated As of 6.2.0 371 */ 372 @Deprecated 373 public void setService(RepositoryEntryLocalService service) { 374 } 375 376 private static RepositoryEntryLocalService _service; 377 }