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 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 226 return getService().getIndexableActionableDynamicQuery(); 227 } 228 229 /** 230 * Returns the OSGi service identifier. 231 * 232 * @return the OSGi service identifier 233 */ 234 public static java.lang.String getOSGiServiceIdentifier() { 235 return getService().getOSGiServiceIdentifier(); 236 } 237 238 public static com.liferay.portal.model.PersistedModel getPersistedModel( 239 java.io.Serializable primaryKeyObj) 240 throws com.liferay.portal.kernel.exception.PortalException { 241 return getService().getPersistedModel(primaryKeyObj); 242 } 243 244 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries( 245 long repositoryId) { 246 return getService().getRepositoryEntries(repositoryId); 247 } 248 249 /** 250 * Returns a range of all the repository entries. 251 * 252 * <p> 253 * 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. 254 * </p> 255 * 256 * @param start the lower bound of the range of repository entries 257 * @param end the upper bound of the range of repository entries (not inclusive) 258 * @return the range of repository entries 259 */ 260 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries( 261 int start, int end) { 262 return getService().getRepositoryEntries(start, end); 263 } 264 265 /** 266 * Returns all the repository entries matching the UUID and company. 267 * 268 * @param uuid the UUID of the repository entries 269 * @param companyId the primary key of the company 270 * @return the matching repository entries, or an empty list if no matches were found 271 */ 272 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId( 273 java.lang.String uuid, long companyId) { 274 return getService() 275 .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId); 276 } 277 278 /** 279 * Returns a range of repository entries matching the UUID and company. 280 * 281 * @param uuid the UUID of the repository entries 282 * @param companyId the primary key of the company 283 * @param start the lower bound of the range of repository entries 284 * @param end the upper bound of the range of repository entries (not inclusive) 285 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 286 * @return the range of matching repository entries, or an empty list if no matches were found 287 */ 288 public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId( 289 java.lang.String uuid, long companyId, int start, int end, 290 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.RepositoryEntry> orderByComparator) { 291 return getService() 292 .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId, 293 start, end, orderByComparator); 294 } 295 296 /** 297 * Returns the number of repository entries. 298 * 299 * @return the number of repository entries 300 */ 301 public static int getRepositoryEntriesCount() { 302 return getService().getRepositoryEntriesCount(); 303 } 304 305 /** 306 * Returns the repository entry with the primary key. 307 * 308 * @param repositoryEntryId the primary key of the repository entry 309 * @return the repository entry 310 * @throws PortalException if a repository entry with the primary key could not be found 311 */ 312 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 313 long repositoryEntryId) 314 throws com.liferay.portal.kernel.exception.PortalException { 315 return getService().getRepositoryEntry(repositoryEntryId); 316 } 317 318 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 319 long userId, long groupId, long repositoryId, java.lang.String objectId) 320 throws com.liferay.portal.kernel.exception.PortalException { 321 return getService() 322 .getRepositoryEntry(userId, groupId, repositoryId, objectId); 323 } 324 325 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry( 326 java.lang.String uuid, long groupId) 327 throws com.liferay.portal.kernel.exception.PortalException { 328 return getService().getRepositoryEntry(uuid, groupId); 329 } 330 331 /** 332 * Returns the repository entry matching the UUID and group. 333 * 334 * @param uuid the repository entry's UUID 335 * @param groupId the primary key of the group 336 * @return the matching repository entry 337 * @throws PortalException if a matching repository entry could not be found 338 */ 339 public static com.liferay.portal.model.RepositoryEntry getRepositoryEntryByUuidAndGroupId( 340 java.lang.String uuid, long groupId) 341 throws com.liferay.portal.kernel.exception.PortalException { 342 return getService().getRepositoryEntryByUuidAndGroupId(uuid, groupId); 343 } 344 345 /** 346 * Updates the repository entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 347 * 348 * @param repositoryEntry the repository entry 349 * @return the repository entry that was updated 350 */ 351 public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry( 352 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 353 return getService().updateRepositoryEntry(repositoryEntry); 354 } 355 356 public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry( 357 long repositoryEntryId, java.lang.String mappedId) 358 throws com.liferay.portal.kernel.exception.PortalException { 359 return getService().updateRepositoryEntry(repositoryEntryId, mappedId); 360 } 361 362 public static RepositoryEntryLocalService getService() { 363 if (_service == null) { 364 _service = (RepositoryEntryLocalService)PortalBeanLocatorUtil.locate(RepositoryEntryLocalService.class.getName()); 365 366 ReferenceRegistry.registerReference(RepositoryEntryLocalServiceUtil.class, 367 "_service"); 368 } 369 370 return _service; 371 } 372 373 private static RepositoryEntryLocalService _service; 374 }