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