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            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> getCategoryProperties() {
246                    return getService().getCategoryProperties();
247            }
248    
249            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> getCategoryProperties(
250                    long entryId) {
251                    return getService().getCategoryProperties(entryId);
252            }
253    
254            public static com.liferay.portlet.asset.model.AssetCategoryProperty getCategoryProperty(
255                    long categoryId, java.lang.String key)
256                    throws com.liferay.portal.kernel.exception.PortalException {
257                    return getService().getCategoryProperty(categoryId, key);
258            }
259    
260            public static com.liferay.portlet.asset.model.AssetCategoryProperty getCategoryProperty(
261                    long categoryPropertyId)
262                    throws com.liferay.portal.kernel.exception.PortalException {
263                    return getService().getCategoryProperty(categoryPropertyId);
264            }
265    
266            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> getCategoryPropertyValues(
267                    long groupId, java.lang.String key) {
268                    return getService().getCategoryPropertyValues(groupId, key);
269            }
270    
271            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
272                    return getService().getIndexableActionableDynamicQuery();
273            }
274    
275            /**
276            * Returns the OSGi service identifier.
277            *
278            * @return the OSGi service identifier
279            */
280            public static java.lang.String getOSGiServiceIdentifier() {
281                    return getService().getOSGiServiceIdentifier();
282            }
283    
284            public static com.liferay.portal.model.PersistedModel getPersistedModel(
285                    java.io.Serializable primaryKeyObj)
286                    throws com.liferay.portal.kernel.exception.PortalException {
287                    return getService().getPersistedModel(primaryKeyObj);
288            }
289    
290            /**
291            * Updates the asset category property in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
292            *
293            * @param assetCategoryProperty the asset category property
294            * @return the asset category property that was updated
295            */
296            public static com.liferay.portlet.asset.model.AssetCategoryProperty updateAssetCategoryProperty(
297                    com.liferay.portlet.asset.model.AssetCategoryProperty assetCategoryProperty) {
298                    return getService().updateAssetCategoryProperty(assetCategoryProperty);
299            }
300    
301            public static com.liferay.portlet.asset.model.AssetCategoryProperty updateCategoryProperty(
302                    long categoryPropertyId, java.lang.String key, java.lang.String value)
303                    throws com.liferay.portal.kernel.exception.PortalException {
304                    return getService()
305                                       .updateCategoryProperty(categoryPropertyId, key, value);
306            }
307    
308            public static com.liferay.portlet.asset.model.AssetCategoryProperty updateCategoryProperty(
309                    long userId, long categoryPropertyId, java.lang.String key,
310                    java.lang.String value)
311                    throws com.liferay.portal.kernel.exception.PortalException {
312                    return getService()
313                                       .updateCategoryProperty(userId, categoryPropertyId, key,
314                            value);
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    }