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