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.asset.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 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.asset.kernel.model.AssetCategoryProperty addAssetCategoryProperty( 051 com.liferay.asset.kernel.model.AssetCategoryProperty assetCategoryProperty) { 052 return getService().addAssetCategoryProperty(assetCategoryProperty); 053 } 054 055 public static com.liferay.asset.kernel.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.asset.kernel.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.asset.kernel.model.AssetCategoryProperty deleteAssetCategoryProperty( 080 com.liferay.asset.kernel.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.asset.kernel.model.AssetCategoryProperty deleteAssetCategoryProperty( 092 long categoryPropertyId) 093 throws com.liferay.portal.kernel.exception.PortalException { 094 return getService().deleteAssetCategoryProperty(categoryPropertyId); 095 } 096 097 public static com.liferay.asset.kernel.model.AssetCategoryProperty fetchAssetCategoryProperty( 098 long categoryPropertyId) { 099 return getService().fetchAssetCategoryProperty(categoryPropertyId); 100 } 101 102 /** 103 * Returns the asset category property with the primary key. 104 * 105 * @param categoryPropertyId the primary key of the asset category property 106 * @return the asset category property 107 * @throws PortalException if a asset category property with the primary key could not be found 108 */ 109 public static com.liferay.asset.kernel.model.AssetCategoryProperty getAssetCategoryProperty( 110 long categoryPropertyId) 111 throws com.liferay.portal.kernel.exception.PortalException { 112 return getService().getAssetCategoryProperty(categoryPropertyId); 113 } 114 115 public static com.liferay.asset.kernel.model.AssetCategoryProperty getCategoryProperty( 116 long categoryId, java.lang.String key) 117 throws com.liferay.portal.kernel.exception.PortalException { 118 return getService().getCategoryProperty(categoryId, key); 119 } 120 121 public static com.liferay.asset.kernel.model.AssetCategoryProperty getCategoryProperty( 122 long categoryPropertyId) 123 throws com.liferay.portal.kernel.exception.PortalException { 124 return getService().getCategoryProperty(categoryPropertyId); 125 } 126 127 /** 128 * Updates the asset category property in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 129 * 130 * @param assetCategoryProperty the asset category property 131 * @return the asset category property that was updated 132 */ 133 public static com.liferay.asset.kernel.model.AssetCategoryProperty updateAssetCategoryProperty( 134 com.liferay.asset.kernel.model.AssetCategoryProperty assetCategoryProperty) { 135 return getService().updateAssetCategoryProperty(assetCategoryProperty); 136 } 137 138 public static com.liferay.asset.kernel.model.AssetCategoryProperty updateCategoryProperty( 139 long categoryPropertyId, java.lang.String key, java.lang.String value) 140 throws com.liferay.portal.kernel.exception.PortalException { 141 return getService() 142 .updateCategoryProperty(categoryPropertyId, key, value); 143 } 144 145 public static com.liferay.asset.kernel.model.AssetCategoryProperty updateCategoryProperty( 146 long userId, long categoryPropertyId, java.lang.String key, 147 java.lang.String value) 148 throws com.liferay.portal.kernel.exception.PortalException { 149 return getService() 150 .updateCategoryProperty(userId, categoryPropertyId, key, 151 value); 152 } 153 154 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 155 return getService().getActionableDynamicQuery(); 156 } 157 158 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 159 return getService().dynamicQuery(); 160 } 161 162 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 163 return getService().getIndexableActionableDynamicQuery(); 164 } 165 166 /** 167 * @throws PortalException 168 */ 169 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 170 com.liferay.portal.kernel.model.PersistedModel persistedModel) 171 throws com.liferay.portal.kernel.exception.PortalException { 172 return getService().deletePersistedModel(persistedModel); 173 } 174 175 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 176 java.io.Serializable primaryKeyObj) 177 throws com.liferay.portal.kernel.exception.PortalException { 178 return getService().getPersistedModel(primaryKeyObj); 179 } 180 181 /** 182 * Returns the number of asset category properties. 183 * 184 * @return the number of asset category properties 185 */ 186 public static int getAssetCategoryPropertiesCount() { 187 return getService().getAssetCategoryPropertiesCount(); 188 } 189 190 /** 191 * Returns the OSGi service identifier. 192 * 193 * @return the OSGi service identifier 194 */ 195 public static java.lang.String getOSGiServiceIdentifier() { 196 return getService().getOSGiServiceIdentifier(); 197 } 198 199 /** 200 * Performs a dynamic query on the database and returns the matching rows. 201 * 202 * @param dynamicQuery the dynamic query 203 * @return the matching rows 204 */ 205 public static <T> java.util.List<T> dynamicQuery( 206 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 207 return getService().dynamicQuery(dynamicQuery); 208 } 209 210 /** 211 * Performs a dynamic query on the database and returns a range of the matching rows. 212 * 213 * <p> 214 * 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. 215 * </p> 216 * 217 * @param dynamicQuery the dynamic query 218 * @param start the lower bound of the range of model instances 219 * @param end the upper bound of the range of model instances (not inclusive) 220 * @return the range of matching rows 221 */ 222 public static <T> java.util.List<T> dynamicQuery( 223 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 224 int end) { 225 return getService().dynamicQuery(dynamicQuery, start, end); 226 } 227 228 /** 229 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 230 * 231 * <p> 232 * 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. 233 * </p> 234 * 235 * @param dynamicQuery the dynamic query 236 * @param start the lower bound of the range of model instances 237 * @param end the upper bound of the range of model instances (not inclusive) 238 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 239 * @return the ordered range of matching rows 240 */ 241 public static <T> java.util.List<T> dynamicQuery( 242 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 243 int end, 244 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 245 return getService() 246 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 247 } 248 249 /** 250 * Returns a range of all the asset category properties. 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.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. 254 * </p> 255 * 256 * @param start the lower bound of the range of asset category properties 257 * @param end the upper bound of the range of asset category properties (not inclusive) 258 * @return the range of asset category properties 259 */ 260 public static java.util.List<com.liferay.asset.kernel.model.AssetCategoryProperty> getAssetCategoryProperties( 261 int start, int end) { 262 return getService().getAssetCategoryProperties(start, end); 263 } 264 265 public static java.util.List<com.liferay.asset.kernel.model.AssetCategoryProperty> getCategoryProperties() { 266 return getService().getCategoryProperties(); 267 } 268 269 public static java.util.List<com.liferay.asset.kernel.model.AssetCategoryProperty> getCategoryProperties( 270 long entryId) { 271 return getService().getCategoryProperties(entryId); 272 } 273 274 public static java.util.List<com.liferay.asset.kernel.model.AssetCategoryProperty> getCategoryPropertyValues( 275 long groupId, java.lang.String key) { 276 return getService().getCategoryPropertyValues(groupId, key); 277 } 278 279 /** 280 * Returns the number of rows matching the dynamic query. 281 * 282 * @param dynamicQuery the dynamic query 283 * @return the number of rows matching the dynamic query 284 */ 285 public static long dynamicQueryCount( 286 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 287 return getService().dynamicQueryCount(dynamicQuery); 288 } 289 290 /** 291 * Returns the number of rows matching the dynamic query. 292 * 293 * @param dynamicQuery the dynamic query 294 * @param projection the projection to apply to the query 295 * @return the number of rows matching the dynamic query 296 */ 297 public static long dynamicQueryCount( 298 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 299 com.liferay.portal.kernel.dao.orm.Projection projection) { 300 return getService().dynamicQueryCount(dynamicQuery, projection); 301 } 302 303 public static void deleteCategoryProperties(long entryId) { 304 getService().deleteCategoryProperties(entryId); 305 } 306 307 public static void deleteCategoryProperty( 308 com.liferay.asset.kernel.model.AssetCategoryProperty categoryProperty) { 309 getService().deleteCategoryProperty(categoryProperty); 310 } 311 312 public static void deleteCategoryProperty(long categoryPropertyId) 313 throws com.liferay.portal.kernel.exception.PortalException { 314 getService().deleteCategoryProperty(categoryPropertyId); 315 } 316 317 public static AssetCategoryPropertyLocalService getService() { 318 if (_service == null) { 319 _service = (AssetCategoryPropertyLocalService)PortalBeanLocatorUtil.locate(AssetCategoryPropertyLocalService.class.getName()); 320 321 ReferenceRegistry.registerReference(AssetCategoryPropertyLocalServiceUtil.class, 322 "_service"); 323 } 324 325 return _service; 326 } 327 328 private static AssetCategoryPropertyLocalService _service; 329 }